Continuous Random Variables Discrete data are data with a finite or countably infinite number of possible outcomes.
Continuous data are data which come from a continuous interval of possible outcomes. It means that continuous data have infinitely many outcomes .
The cumulative distribution function remains the same for discrete and continuous random data.
Probability Density Function (p.d.f) The probability density function of a continuous random variable X is an integrable function f X : X ( S ) → R f_X: X(S) \to \R f X : X ( S ) → R
P ( A ) = P ( a , b ) = ∫ a b f X ( x ) d x P(A) = P(a,b) = \int_{a}^{b} f_X (x) dx P ( A ) = P ( a , b ) = ∫ a b f X ( x ) d x
Expectation E [ X ] = ∫ − ∞ ∞ x f X ( x ) d x \mathrm{E}[X] = \int_{-\infty}^{\infty} xf_X (x) dx E [ X ] = ∫ − ∞ ∞ x f X ( x ) d x
Note that the expectation exists if the integral exists
Mean and Variance As in the discrete case, if X , Y X,Y X , Y are continuous random variables, and a , b ∈ R a,b \in \R a , b ∈ R ,
E [ a Y + b X ] = a E [ Y ] + b E [ X ] \mathrm{E}[aY +bX] = a\mathrm{E}[Y] + b\mathrm{E}[X] E [ a Y + b X ] = a E [ Y ] + b E [ X ]
V a r [ a + b X ] = b 2 V a r [ X ] \mathrm{Var}[a+bX] = b^2\mathrm{Var}[X] V a r [ a + b X ] = b 2 V a r [ X ]
S D [ a + b X ] = ∣ b ∣ S D [ X ] \mathrm{SD}[a+bX] = |b|\mathrm{SD}[X] S D [ a + b X ] = ∣ b ∣ S D [ X ]
Standard Normal Distribution ϕ ( z ) = 1 2 π e − z 2 / 2 \phi(z) = \frac{1}{\sqrt{2\pi}}e^{-z^2/2} ϕ ( z ) = 2 π 1 e − z 2 / 2
and the corresponding cumulative distribution function is denoted by Φ ( z ) = P ( Z ≤ z ) = ∫ − ∞ z ϕ ( t ) d t \Phi(z) = P(Z \leq z) = \int_{-\infty}^{z} \phi(t)dt Φ ( z ) = P ( Z ≤ z ) = ∫ − ∞ z ϕ ( t ) d t
A random variable Z Z Z with this c.d.f is said to have a standard normal distribution, and we write Z ∼ N ( 0 , 1 ) Z \sim N (0,1) Z ∼ N ( 0 , 1 )
Expectation and Variance E [ Z ] = ∫ − ∞ ∞ z ϕ ( z ) d z = ∫ − ∞ ∞ z 1 2 π e − z 2 / 2 d z = 0 \mathrm{E}[Z] = \int_{-\infty}^{\infty} z\phi(z)dz = \int_{-\infty}^{\infty} z\frac{1}{\sqrt{2\pi}}e^{-z^2/2} dz = 0 E [ Z ] = ∫ − ∞ ∞ z ϕ ( z ) d z = ∫ − ∞ ∞ z 2 π 1 e − z 2 / 2 d z = 0
V a r [ Z ] = ∫ − ∞ ∞ z 2 ϕ ( z ) d z = 1 \mathrm{Var}[Z] = \int_{-\infty}^{\infty} z^2\phi(z)dz = 1 V a r [ Z ] = ∫ − ∞ ∞ z 2 ϕ ( z ) d z = 1
S D [ Z ] = V a r [ Z ] = 1 = 1 \mathrm{SD}[Z] = \sqrt{\mathrm{Var}[Z]} = \sqrt{1} = 1 S D [ Z ] = V a r [ Z ] = 1 = 1
General Normal Random Variable Z ∼ N ( 0 , 1 ) = X − μ σ Z \sim N(0,1) = \frac{X-\mu}{\sigma} Z ∼ N ( 0 , 1 ) = σ X − μ
c.d.f is given by F X ( x ) = Φ ( x − μ σ ) F_X(x) = \Phi(\frac{x-\mu}{\sigma}) F X ( x ) = Φ ( σ x − μ )
p.d.f is given by f X ( x ) = 1 σ ϕ ( x − μ σ ) f_X(x) = \frac{1}{\sigma} \phi(\frac{x-\mu}{\sigma}) f X ( x ) = σ 1 ϕ ( σ x − μ )
Any random variable X X X with this c.d.f/p.d.f must satisfy: E [ X ] = μ , V a r [ X ] = σ 2 , S D [ X ] = σ \mathrm{E}[X] = \mu, \mathrm{Var}[X] = \sigma^2, \mathrm{SD}[X] = \sigma E [ X ] = μ , V a r [ X ] = σ 2 , S D [ X ] = σ
Exponential Random Variable Assume that cars arrive according to a Poisson process with rate λ, i.e. the number of cars arriving within a fixed unit time period is a Poisson random variable with parameter λ. Over a period of time x, we would expect the number of arrivals N to
follow a Poisson process with parameter λx. Let X be the waiting time to the first car arrival. Then
P ( X > x ) = 1 − P ( X ≤ x ) = P ( N = 0 ) = e x p ( − λ x ) P(X > x) = 1 - P(X ≤ x) = P(N = 0) = exp(-λx) P ( X > x ) = 1 − P ( X ≤ x ) = P ( N = 0 ) = e x p ( − λ x )
We say that X follows a exponential distribution E x p ( λ ) \mathrm{Exp}(λ) E x p ( λ ) , and
F X ( x ) = { 0 f o r x < 0 a n d 1 − e − λ x f o r 0 ≤ x } F_X(x) = \{0 \ \mathrm{for} \ x < 0 \ \mathrm{and} \ 1-e^{-\lambda x} \ \mathrm{for} \ 0 \leq x\} F X ( x ) = { 0 f o r x < 0 a n d 1 − e − λ x f o r 0 ≤ x }
f X ( x ) = { 0 f o r x ≤ 0 a n d λ e − λ x f o r 0 ≤ x } f_X(x) = \{0 \ \mathrm{for} \ x \leq 0 \ \mathrm{and} \ \lambda e^{-\lambda x} \ \mathrm{for} \ 0 \leq x\} f X ( x ) = { 0 f o r x ≤ 0 a n d λ e − λ x f o r 0 ≤ x }
Properties If X ∼ E x p ( λ ) X \sim \mathrm{Exp}(\lambda) X ∼ E x p ( λ ) , then:
μ = E [ X ] = 1 / λ \mu = \mathrm{E}[X] = 1/\lambda μ = E [ X ] = 1 / λ σ 2 = V a r [ X ] = 1 / λ 2 \sigma^2 = \mathrm{Var}[X] = 1/\lambda^2 σ 2 = V a r [ X ] = 1 / λ 2 Memory-Less Property :
P ( X > s + t ∣ X > t ) = P ( X > s ) P(X > s + t | X > t) = P(X > s) P ( X > s + t ∣ X > t ) = P ( X > s )
Gamma Random Variable f Y ( y ) = { 0 f o r y < 0 a n d y k − 1 ( k − 1 ) ! λ k e − λ y f o r 0 ≤ y } f_Y (y) = \{0 \ \mathrm{for} \ y < 0 \ \mathrm{and} \ \frac{y^{k-1}}{(k-1)!}\lambda^ke^{-\lambda y} \ \mathrm{for} \ 0 \leq y\} f Y ( y ) = { 0 f o r y < 0 a n d ( k − 1 ) ! y k − 1 λ k e − λ y f o r 0 ≤ y }
μ = E [ Y ] = k y \mu = \mathrm{E}[Y] = \frac{k}{y} μ = E [ Y ] = y k and σ 2 = V a r [ X ] = k λ 2 \sigma^2 = \mathrm{Var}[X] = \frac{k}{\lambda^2} σ 2 = V a r [ X ] = λ 2 k
Joint Distributions f ( x , y ) ≥ 0 , f(x, y) ≥ 0, f ( x , y ) ≥ 0 , for all x , y x, y x , y ∫ − ∞ ∞ ∫ − ∞ ∞ f ( x , y ) d x d y = 1 \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f(x, y) dxdy = 1 ∫ − ∞ ∞ ∫ − ∞ ∞ f ( x , y ) d x d y = 1 P ( A ) = ∫ ∫ A f ( x , y ) d x d y , P(A) = \int \int_A f(x, y) dxdy, P ( A ) = ∫ ∫ A f ( x , y ) d x d y , where A ⊆ R 2 A ⊆ \R^2 A ⊆ R 2 Normal Approximation of the Binomial Distribution If X ∼ B ( n , p ) X \sim B(n, p) X ∼ B ( n , p ) then we may interpret X X X as a sum of independent and identically distributed random variables
X = I 1 + I + . . . + I n X = I_1 + I_ + ... + I_n X = I 1 + I + . . . + I n where each I i ∼ B ( 1 , p ) I_i \sim B(1, p) I i ∼ B ( 1 , p ) .
Thus, according to the Central Limit Theorem (more on this later), for large n n n , we have
X − n p n p ( 1 − p ) ≈ N ( 0 , 1 ) \frac{X-np}{\sqrt{np(1-p)}} \approx N (0,1) n p ( 1 − p ) X − n p ≈ N ( 0 , 1 )
for large n n n if X ∼ B ( n , p ) X \sim B(n, p) X ∼ B ( n , p ) then X ≈ N ( n p , n p ( 1 − p ) ) X \approx N (np, np(1 - p)) X ≈ N ( n p , n p ( 1 − p ) ) .
Normal Approximation with Continuity Correction Let X ∼ B ( n , p ) X \sim B(n, p) X ∼ B ( n , p ) . Recall that E[ X ] = n p [X] = np [ X ] = n p and Var[ X ] = n p ( 1 − p ) [X] = np(1 - p) [ X ] = n p ( 1 − p ) . If n n n is large, we may approximate X X X by a normal random variable in the following way:
P ( X ≤ x ) = P ( X < x + 0.5 ) = P ( Z < x − n p + 0.5 n p ( 1 − p ) ) P(X ≤ x) = P(X < x + 0.5) = P(Z < \frac{x-np+0.5}{\sqrt{np(1-p)}}) P ( X ≤ x ) = P ( X < x + 0 . 5 ) = P ( Z < n p ( 1 − p ) x − n p + 0 . 5 )
and
P ( X ≥ x ) = P ( X > x − 0.5 ) = P ( Z > x − n p − 0.5 n p ( 1 − p ) ) P(X \geq x) = P(X > x - 0.5) = P(Z > \frac{x-np-0.5}{\sqrt{np(1-p)}}) P ( X ≥ x ) = P ( X > x − 0 . 5 ) = P ( Z > n p ( 1 − p ) x − n p − 0 . 5 )