Download Probability Distributions: Normal, Exponential, Gamma, and Poisson - Prof. Lia Y. Liu and more Study notes Data Analysis & Statistical Methods in PDF only on Docsity!
1
STAT381 Lia Liu
Chap 3: Continuous Probability Models
List of topics: Section 3.
- Continuous random variable: a random variable that takes values of an entire interval.
- A function f (y) is a probability density function of a continu- ous random variable (in short pdf ) for some random vari- able Y if it satisfies two conditions:
- f (y) ≥ 0;
- ∫ (^) ∞ −∞ f^ (y)dy^ = 1
- Distribution function of a random variable(in short, DF): F (y) = P (Y ≤ y), −∞ < y < ∞ Note: F (−∞) = 0, F (∞) = 1, F is increasing(nondecreasing).
- Probability Density function of a continuous random vari- able (in short pdf ): f (y) = F ′(y)
- How to compute probability?
- using pdf: P (a ≤ Y ≤ b) = ∫ (^) b a f^ (y)dy
- using DF: P (a ≤ Y ≤ b) = F (b) − F (a) Note the difference between discrete and continuous r.v.: If Y is a continuous r.v., then P (a ≤ Y ≤ b) = P (a < Y ≤ b) = P (a < Y < b) = P (a ≤ Y < b) because P (X = a) = 0(area of a line segment).
- Expected value μ = E(X) = ∫ (^) ∞ −∞ xf^ (x)dx Variance σ^2 = V (X) = E(X − μ)^2 = E(X^2 ) − μ^2 Standard deviation σ =
√ V (X)
Sections 3.
List of topics: Normal Distribution
- A continuous rv is said to have a normal distribution with parameters mean μ and standard deviation σ, where −∞ < μ < ∞ and σ > 0 , if the pdf of X is
f (x) =
2 πσ
e−(x−μ)
(^2) /(2σ (^2) ) , −∞ < x < ∞
- Standard normal: when μ = 0 and σ = 1.
- How to compute probability of a Standard Normal rv us- ing Table C4? TI-83 or TI-84? P (a < Z < b) = normalcdf (a, b)
- How to compute probability of any Normal rv using Table C4? Standardize or P (a < X < b) = normalcdf (a, b, μ, σ)
- The Empirical Rule (68-95-99.7 rule): If a rv Y satisfies a Normal Distribution with mean μ and standard deviation σ, then
- The probability that Y is within one standard deviation from the mean =P (|Y − μ| ≤ σ) is roughly 68%;
- The probability that Y is within two standard deviation from the mean =P (|Y − μ| ≤ 2 σ) is roughly 95%;
- The probability that Y is within three standard devia- tion from the mean =P (|Y − μ| ≤ 3 σ) is roughly 99 .7%;
- How to use Normal to approximate Binomial distribu- tion? Half unit correction
when we pick an exponential function, we call it“Gompertz”.
If the old is just as good as new, we say it has no memory. Then the Failure rate is a constant. Our distribution is then called Exponential distribution. We use
- 3.3.1. Weibull Distribution: A continuous rv X is said to have a Weibull Distribution with parameters α and β, if the pdf of X is f (x; α, β) =
α βα^
xα−^1 e−(x/β)
α , x ≥ 0
- 3.3.2. Gompertz distribution: If the parts has no memory, then λ(x) = constant. The distribution is exponential. If it increase like a power function, match the constant, we get a Weibull distribution (so λ(x) = αxα−^1 /βα) Human mortality (failure rate) increases exponentially once a person reaches mid twenties. λ(x) = cebx The distribution is called Gompertz.
- 3.3.4. Gamma Distribution: A continuous rv X is said to have a gamma distribution with parameters α and β, if the pdf of X is f (x; α, β) =
βαΓ(α)
xα−^1 e−(x/β), x ≥ 0
- Γ(α) is called gamma function which is defined by Γ(α) = ∫ (^) ∞ 0 x α− (^1) e−x, α > 0
- Properties of a gamma function:
- Recursive: For any a > 1 , Γ(a) = (a − 1) · Γ(a − 1)
- For any positive integer n, Γ(n) = (n − 1)!
- Γ(1/2) =
π
- The mean and variance of r.v X with a gamma distri- bution is E(X) = μ = αβ; V (X) = σ^2 = αβ^2 The gamma distribution is used to model the waiting time until kth occurrence. If λ is the mean number of occurrences in an interval of length 1, then the waiting time until kth occurrence is Gamma distribution with α = k, β = 1/λ
- Special case I: Exponential distribution: Waiting time be- tween any two occurrences is Gamma distribution with α = 1, β = 1/λ pdf of an exponential rv, X, is f (x; λ) = λe−λx, x ≥ 0 The mean waiting time is 1 /λ. We usually use exponential distribution to model waiting time between two occurrences, if the process is memoryless.
- Special case II: 3.3.5. Chi-square distribution: is Gamma distribution with α = v/ 2 , β = 2. We shall see it later on.
- 3.3.6. Lognormal distribution: A continuous rv X is said to have a Lognormal Distribution with parameters μ and σ, if the pdf of X is
f (x; μ, σ) =
2 πσx
e−(ln(x)−μ)
(^2) /(2σ (^2) ) , x ≥ 0
If Y has a Normal distribution N (μ, σ^2 ), then X = eY^ has a lognormal distribution. How to derive the pdf of X?
F (x) = P (X ≤ x) = P (eY^ ≤ x) = P (Y ≤ ln x) =
∫ (^) ln x −∞ ce
− (t 2 −σμ 2 ) (^2) dt
f (x) = (^) dxd F (x)
- Model that relates Poisson distribution, Gamma distribu- tion and Exponential distribution:
Sections 3.5 Dist of 2 cont. r.vs Print out the extra problems for double integral on my webpage.
List of topics:
- Continuous case: Joint density fX,Y (x, y) Note: This f is not a probability. However, (1) f ≥ 0; (2)
∫ ∫ R^2 f^ (x, y)dxdy^ = 1 (3) P [(x, y) ∈ A] = ∫ ∫ Af^ (x, y)dxdy
- CDF of X and Y : FX,Y (x, y) = P [(X ≤ x) ⋂(Y ≤ y)]
- Continuous case: Joint density
fX,Y (x, y) =
∂^2 FX,Y (x, y) ∂x∂y (2nd mixed partial derivative)
- Marginal pdfs: fX (x) =
∫ (^) ∞ −∞ f^ (x, y)dy
- Expectations: E(u(X, Y )) =
∫ ∫ R^2 u(x, y)f^ (x, y)dxdy
- Conditional pdf is the ratio of joint pdf to marginal pdf.
Continuous case: fX|Y (x|y) = fX,Y (x, y) fY (y)
, fY (y) > 0
- Conditional expectation: E(u(Y )|x) = ∫ (^) ∞ −∞ u(y)fY^ |X^ (y|x)dy (which is a function of x.) Hence E(Y |X) is a random variable of X.
- Covariance of X and Y : cov(X, Y ) = E[(X − μX )(Y − μY )] (easier to understand) cov(X, Y ) = E(XY ) − μX μY (easier for calculation)
- Correlation coefficient ρ =
cov(X, Y ) σX σY How can you tell X and Y are independent r.v.s?
- Equivalent conditions: X and Y are independent iff
(1) By pdf: fX,Y (x, y) ≡ fX (x)fY (y) (note the regions.) (2) By CDF: F (x, y) = FX (x)FY (y) for all (x, y) (3) By MGF: M (t 1 , t 2 ) = M (t 1 , 0)M (0, t 2 ) (Not covered in stat381)
- How can you tell two r.v. X and Y are independent by joint density? Region and function
- What happens to covariance(and corelation coefficient) if X and Y are independent? If X and Y are independent, then Cov(X, Y ) = 0, hence ρ = 0. However, if Cov(X, Y ) = 0, or ρ = 0, X and Y may not be independent. Facts: - − 1 ≤ ρ ≤ 1 - ρ = ± 1 implies“perfect linear relationship between X and Y .” - ρ = 0 implies “No linear relationship between X and Y (but can be quadratic, for example).” - ρ > 0 means X and Y are positively related (If X in- creases, so is Y ). - ρ < 0 means X and Y are negatively related (If X increases, Y decreases). - If X and Y are independent, then Cov(X, Y ) = 0, hence ρ = 0. However, if Cov(X, Y ) = 0, or ρ = 0, X and Y may not be independent.
Section 4.1 Sampling distribution and the CLT
List of topics:
Given n rv’s X 1 , X 2 , ..., Xn (not necessarily random sample). We consider linear combination
Y = a 1 X 1 + a 2 X 2 + ... + anXn
- Expectation is linear: E(Y ) = a 1 E(X 1 ) + a 2 E(X 2 ) + ... + anE(Xn)
- Variance is not linear, but we still have V (Y ) = Σni=1Σnj=1aiaj Cov(Xi, Xj ) = a 12 V (X 1 ) + a 22 V (X 2 ) + ... + an^2 V (Xn) + 2a 1 a 2 Cov(X 1 , X 2 ) + ... + 2an− 1 anCov(Xn− 1 , Xn)
- In case Xi’s are independent, all covariances are zero. V (Y ) = a 12 V (X 1 ) + a 22 V (X 2 ) + ... + an^2 V (Xn)
- Example: E(X 1 − X 2 ) = E(X 1 ) − E(X 2 ); V (X 1 − X 2 ) = V (X 1 ) + V (X 2 ) − 2 Cov(X 1 , X 2 ); If X 1 , X 2 are independent, V (X 1 − X 2 ) = V (X 1 ) + V (X 2 )
- Example: X 1 is a rv with Binomial B(n,p); X 2 is a rv with Poisson λ; X 3 is a rv with Normal N (μ, σ^2 ); Suppose Xi’s are independent for i = 1, 2 , 3. Find E(X 1 + 2X 2 − 3 X 3 ); V (X 1 + 2X 2 − 3 X 3 ); E(X 1 + X 2 + X 3 ); V (X 1 + X 2 + X 3 );
E(
X 1 + X 2 + X 3
); V (
X 1 + X 2 + X 3
- Stable distributions: Normal, Binomial, Poisson, Chi-square. Not stable: Exponential
- Independent and identically distributed random variables(i.i.d.)
- random sample (iid)
- Sample mean X, E(X), V (X)
- Sample sum Sn = X 1 + X 2 + ... + Xn, what is E(Sn)? V (Sn)?
- Central Limit Theorem: Roughly speaking, no matter what is the population distribution, as long as the sample size is large, the sample mean and the sample sum are normal. Version 1: Let X 1 , X 2 , ... be iid’s, each with mean μ and standard deviation σ, (both finite), then
limn→∞ P (a <
Sn − nμ √ nσ < b) =
2 π
∫ (^) b a e
−z^2 / (^2) dz
Version 2: Let X 1 , X 2 , ... be iid’s, each with mean μ and standard deviation σ, (both finite), then
limn→∞ P (a <
X − μ σ/
n
< b) =
2 π
∫ (^) b a e
−z^2 / (^2) dz
- Population: Binomial with unknown population propor- tion p. When n is large (np ≥ 10 , nq ≥ 10 ), Choose test statistics: Y^ ˆ = Y /n, where Y is the number of heads out of n tosses.
Use Z- test: Z ≈ √pˆ^ −^ p p ˆq/nˆ
- Two populations: p 1 − p 2 :Bernoulli trials: under proper assumptions, p ˆ 1 − pˆ 2 has mean p 1 − p 2 and SD
√ (^) p 1 q 1 n 1 +^
p 2 q 2 n 2
- Standard deviation is usually the trouble-maker because it is usually unknown. We shall use various defined standard errors to approximate.
- To find confidence interval for p 1 − p 2 , use ”hats” to ap- proximate: SE( ˆp 1 − pˆ 2 ) =
√ pˆ 1 qˆ 1 n 1 +^
pˆ 2 qˆ 2 n 2
- To do hypothesis testing, e.g
H 0 : p 1 − p 2 = 0 Use pooled standard error SEpooled( ˆp 1 − pˆ 2 ) =
√ p ˆpooled qˆpooled( (^) n^11 + (^) n^12 ),
where pˆpooled = n^1 npˆ^11 ++nn^22 pˆ^2 When n is large enough to use Z-test, the z-score is Z = ( ˆp 1 − pˆ 2 )− 0 SEpooled( ˆp 1 − pˆ 2 ).^ Then according to^ HA^ hypothesis, compute the corresponding P-value.
- Given a random sample from a Normal population with unknown μ and unknown standard deviation σ, , what can you say about σ^2? Use χ^2 test: χ^2 = (n−1)S
2 σ^2 has^ χ
(^2) distribution with n − 1 degree of freedom. The 1 − α CI for σ^2 is ((n−1)S
2 χ^2 α/ 2 ,n− 1 ,^
(n−1)S^2 χ^21 −α/ 2 ,n− 1 )
Construction process:
- Z-test: Let P (−zα/ 2 < (^) σ/X−√μn < zα/ 2 ) = 1 − α
Solve the inequality for μ.
- t-Test:
- What is a t-distribution? If a rv Z has N(0,1), V has χ^2 n distribution, then Tn = √^ Z V /n
has t-distribution with df n.
- The pdf of a t-distribution with df n is
f (t) =
Γ(n+1 2 ) √ nπΓ(n 2 )
(1 + t 2 n ) (n+1)/ 2 ,^ −∞^ < t <^ ∞^.
- E(Tn) = 0, V (Tn) = (^) n−n 2 What happens if n is large?
- Since Z = (^) σ/X−√μn is N(0,1) and V = (n−1)S
2 σ^2 has^ χ
2 n− 1 dis- tribution,
Hence Tn− 1 =
X−μ √ σ/√n (n−1)S^2 σ^2 (n−1)
X − μ s/
n
has t-distribution with
df n − 1. Proof: T (^) n^2 has an F-distribution F(1,n).
- For Binomial distribution, X= number of heads out of n tosses. E(X) = np, V (X) = npq. - Let pˆ = X/n, then E(ˆp) = p, V (ˆp) = pqn. - When n is large (np ≥ 10 , nq ≥ 10 ), use Normal: P (−zα/ 2 < √pˆpq/n−p < zα/ 2 ) = 1 − α Now p, q are unknown, one way to overcome the dif- ficulty is to use pˆ to replace p, we get the confidence interval for p: p ˆ ± zα/ 2
√ p ˆq/nˆ
Case Study: Coral are decline worldwide, possibly be- cause of pollution or changes in sea temperature. One kind of coral, the sea fan, looks like a plant growing from the sea floor, but is actually an animal. In June 2000, Dr. Drew Harvell’s lab randomly sampled some sea fans at the Las Redes Reef in Akumal, Mexico, at a depth of 40 ft. They found that 54 of the 104 sea fans they sampled were infected with disease. The sample proportion pˆ = 54/104 = 51.9%. What can we say about the population proportion p? √ p ˆq/nˆ = 4.9%, hence 95% confidence interval for p is (42.1%, 61 .7%) What can we say about p? True or false:
- “ 51 .9% of all sea fans on the Las Redes Reef are in- fected.”
- “ It is probably true that 51 .9% of all sea fans on the Las Redes Reef are infected.”
- “We don’t know exactly what proportion of sea fans on the Las Redes Reef are infected but we know that it is within (42.1%, 61 .7%).
- “We don’t know exactly what proportion of sea fans on the Las Redes Reef are infected but we know that it is probably within (42.1%, 61 .7%). What you cannot say:
- Don’t suggest that the parameter varies.
- Don’t claim that other samples will agree with yours.
- Don’t be certain about the parameter. “Between a and b of sea fans are infected”
- Don’t forget: it is the parameter. “I am 95% confident that pˆ is between so and so”
- Don’t claim to know too much. (generalize)
- Do take responsibility. Confidence interval is about un- certainty. You are the one who is uncertain, not the pa- rameter. Not all the intervals you compute will capture the true value of the parameter.
P-value: P (ˆp < .94) = P (Z <.^940 .− 015.^95 ) = 0. 252 Not enough evidence to reject H 0. Not enough evidence to claim the new system fails the goal.
- P-Values are the conditional probability of the tail(s) if the null hypothesis were true: (i) If HA : p < p 0 , the P-value is P (ˆp < xn |H 0 is true); or standardize
P = P (Z <
x n √ − p^0 p 0 q 0 n
(ii) If HA : p > p 0 , the P-value is P (ˆp > xn |H 0 is true); or standardize
P = P (Z >
x n √ − p^0 p 0 q 0 n
(iii) If HA : p 6 = p 0 , the P-value is
2 P (Z > |
x n √ − p^0 p 0 q 0 n
||H 0 is true).
- The smaller the P-value is, the stronger the evidence is against the null hypothesis.
- If given a significance level α, then when P-value ≤ α, reject the H 0.
- Rule of Thumb: If the significance level is not given, reject the null hypothesis if the P-value is less than 5%.
- If the P-value is larger than the preset significance level α, say “Not enough evidence to reject the null hypothe- sis”, instead of “Accept the null hypothesis”. (compare to “Not enough evidence to prove the defendant is guilty”, instead of “the defendant is proven innocent”.
- If the significance level, α, is given, instead of finding the P-value, you have the alternative way to make a decision, by finding the critical value, z∗, according to α.
- Two types of errors: (Type I: The defendant is innocent, but the jury find him guilty. Type II: The defendant is guilty, but the jury find him innocent.) Type I: The null hypothesis is true, but we made a wrong decision to reject it. Type II: The null hypothesis is false, but we failed to reject it.
- The probability of making a type I error is α, which is called the significance level of the test.
- The probability of making a type II error is β, which is not easy to calculate.
- When we choose some values of the parameter, and cal- culate the type II error, the curve is called the operating characteristic curve. e.g. OC(p) or OC(μ)
- A test’s ability to detect a false null hypothesis is called the power of the test. The power of a test is the probability that it correctly rejects a false null hypothesis, i.e. P(Reject H 0 |H 0 is false)=P(Reject H 0 |HA is true)= 1 − β
- Is it possible to reduce both Type I and Type II errors at the same time? Yes, by increasing the sample size.
- Graph
Case 1: Inferences about μ
List of topics:
- Conditions to check: One population, SRS, nearly normal population
2. If the population standard deviation σ is given, or if σ is
unknown but the sample size is larger than 30,