Week 5-8 Short Notes
Week 5-8 Short Notes
Week 5 Notes
1
• The integral may diverge to ±∞ or may not exist in some cases.
X E[X] Var(X)
a+b (b−a)2
Uniform[a, b] 2 12
1 1
Exp(λ) λ λ2
Normal(µ, σ 2 ) µ 2
σ
6. Markov’s inequality:
If X is a continuous random variable with mean µ and non-negative supp(X) (i.e. P (X <
0) = 0), then
µ
P (X > c) ≤
c
7. Chebyshev’s inequality:
If X is a continuous random variable with mean µ and variance σ 2 , then
1
P (|X − µ| ≥ kσ) ≤
k2
8. Marginal density: Let (X, Y ) be jointly distributed where X is discrete with range
TX and PMF pX (x).
For each x ∈ TX , we have a continuous random variable Yx with density fYx (y).
fYx (y) : conditional density of Y given X = x, denoted fY |X=x (y).
• Marginal density of Y
P
– fY (y) = pX (x)fY |X=x (y)
x∈TX
2
9. Conditional probability of discrete given continuous: Suppose X and Y are
jointly distributed with X ∈ TX being discrete with PMF pX (x) and conditional densi-
ties fY |X=x (y) for x ∈ TX . The conditional probability of X given Y = y0 ∈ supp(Y ) is
defined as
3
Statistics for Data Science - 2
Week 6 Notes
Continuous Random Variables
2. 2D uniform distribution: Fix some (reasonable) region D in R2 with total area |D|.
We say that (X, Y ) ∼ Uniform(D) if they have the joint density
(
1
(x, y) ∈ D
fXY (x, y) = |D|
0 otherwise
3. Marginal density: Suppose (X, Y ) have joint density fXY (x, y). Then,
y=∞
• X has the marginal density fX (x) =
R
fXY (x, y)dy.
y=−∞
x=∞
• Y has the marginal density fY (y) =
R
fXY (x, y)dx.
x=−∞
– In general the marginals do not determine joint density.
4. Independence: (X, Y ) with joint density fXY (x, y) are independent if
• fXY (x, y) = fX (x)fY (y)
– If independent, the marginals determine the joint density.
5. Conditional density: Let (X, Y ) be random variables with joint density fXY (x, y).
Let fX (x) and fY (y) be the marginal densities.
• For a such that fX (a) > 0, the conditional density of Y given X = a, denoted as
fY |X=a (y), is defined as
fXY (a, y)
fY |X=a (y) =
fX (a)
• For b such that fY (b) > 0, the conditional density of X given Y = b, denoted as
fX|Y =b (x), is defined as
fXY (x, b)
fX|Y =b (x) =
fY (b)
6. Properties of conditional density: Joint = Marginal × Conditional, for x = a and
y = b such that fX (a) > 0 and fY (b) > 0.
Page 2
Statistics for Data Science - 2
Week 7 Notes
Statistics from samples and Limit theorems
1. Empirical distribution:
Let X1 , X2 , . . . , Xn ∼ X be i.i.d. samples. Let #(Xi = t) denote the number of times
t occurs in the samples. The empirical distribution is the discrete distribution with
PMF
#(Xi = t)
p(t) =
n
• The empirical distribution is random because it depends on the actual sample
instances.
• Descriptive statistics: Properties of empirical distribution. Examples :
– Mean of the distribution
– Variance of the distribution
– Probability of an event
• As number of samples increases, the properties of empirical distribution should
become close to that of the original distribution.
2. Sample mean:
Let X1 , X2 , . . . , Xn ∼ X be i.i.d. samples. The sample mean, denoted X, is defined to
be the random variable
X1 + X 2 + . . . + Xn
X=
n
• Given a sampling x1 , . . . , xn the value taken by the sample mean X is x =
x1 + x2 + . . . + xn
. Often, X and x are both called sample mean.
n
σ2
E[X] = µ, Var(X) =
n
• Expected value of sample mean equals the expected value or mean of the distri-
bution.
• Variance of sample mean decreases with n.
4. Sample variance:
Let X1 , X2 , . . . , Xn ∼ X be i.i.d. samples. The sample variance, denoted S 2 , is defined
to be the random variable
(X1 − X)2 + (X2 − X)2 + . . . + (Xn − X)2
S2 = ,
n−1
6. Sample proportion:
The sample proportion of A, denoted S(A), is defined as
Page 2
Statistics for Data Science - 2
Week 8 Notes
Statistics from samples and Limit theorems
5. Cauchy distribution:
1 α
X ∼ Cauchy(θ, α2 ) if PDF fx (x) ∝
π α + (x − θ)2
2
• θ is a location parameter.
• α > 0 is a scale parameter.
• Mean and variance are undefined.
Page 2
n 1
• Gamma , is called Chi-square distribution with n degrees of freedom, de-
2 2
noted χ2n .
Page 3