# Week 1: Data Science Math Skills

• Sets and What They’re Good For
• The infinite World of Real Numbers
• That Jagged S Symbol

# Set

A set is a collection of things, in general set is a collection of elements

• 1 ∈ A ( means 1 is an element of A)
• 5 ∉ A ( means 5 is not an element of A)

# Cardinality

Cardinality means the size of a set means the number of elements in it.

• The cardinality of |A| = 6 (because there are 6 elements in A)
• The cardinality of |B| = 3 (because there are 3 elements in B)

# Intersections

Intersection simple means the elements which are present in both sets.The symbol for intersection is ∩ which is known as intersects and in general “and”

`A ∩ C = ∅ (∅, is known as the empty set)`

# Unions

Unions simple means the elements which are present in either set.The symbol for union is ∪ which is known as union and in general “or”

# Medical Testing Example

As a part of the course I also learned about a medical testing example. This medical example is best example to understand, how we can implement sets in real world. So, one think to note that VBS means “very bad syndrome” in this example.

`S ∩ H = ∅ (No one person is both S and H)S ∪ H = X ( either person have VBS or not)`

## Test

`P ∩ N = ∅ (No one tests is both P and N)P ∪ N = X (Either test is P or N)`
• S ∩ P are True Positive
• H ∩ N are True Negative
• S ∩ N are False Negative
• H ∩ P are False Positive

## Cardinality (size)

`|S|───  = proportion of people who have VBS|X||H|───  = proportion of people who do not have VBS|X||S∩P|─────  = true positive rate  |X||H∩N|─────  = true negative rate  |X||H∩P|─────  = false positive rate  |X||S∩N|─────  = false negative rate  |X|`

# Venn Diagrams

Venn Diagrams is the way to visualize sets

1. A = {1,5,10,2}

# Inclusion-Exclusion Formula

According to the formula,

`|A ⋃ B| = |A| + |B|- |A ∩ B|`
`|A ⋃ B| = 8, {1,9,6,3,4,8} |A| = 5, {1,9,6,5,7}|B| = 5, {3,4,8,5,7}|A ∩ B| = 2, {5,7}|A ⋃ B| = |A| + |B|- |A ∩ B|8 = 5 + 5–28 = 10 -28 = 8`

# Absolute Value

For any x ∈ ℝ,

`|x| = x, if x is non-negative|x| = -x, if x is negative`

# Inequalities

`a < b “ a is less than b”a > b “a is greater than b”a ≤ b “a is less than or equal to b”a ≥ b “a is greater than or equal to b”a << b “a is much much lesser than b”`

# Closed intervals

In closed intervals square brackets [] are used ..

# Open intervals

In open intervals parentheses () are used ..

# Half-open intervals

In Half-open intervals both open and closed intervals are used ..

# Sigma Notation

Sigma is represented by Σ, some example are:

`i is just an “dummy indices”, that is used as a counter.`

# Summation of constants

Summation of constants means if the whole value is constant then sum that value to n times

# Mean and Variance

To calculate the value of μ

--

--

## More from Nishant Tiwari

Programming , Ethical Hacking and Cyber Security

Love podcasts or audiobooks? Learn on the go with our new app.