Hypothesis Testing
Download
Report
Transcript Hypothesis Testing
Hypothesis Testing
Hypothesis Testing
• Suppose we believe the average systolic blood pressure
of healthy adults is normally distributed
with mean μ = 120 and variance σ2 = 50.
• To test this assumption, we sample the blood pressure of
42 randomly selected adults. Sample statistics are
Mean X = 122.4
Variance s2 = 50.3
Standard Deviation s = √50.3 = 7.09
Standard Error = s / √n = 7.09 / √42 = 1.09
Central Limit Theorem
• The distribution of all sample means of sample size n from a
Normal Distribution (μ, σ2) is a normally distributed with
Mean = μ
Variance = σ2 / n
• For our case:
Mean μ = 120
Variance σ2 / n = 50 / 42 = 1.19
Note: Theoretically we can test the hypothesis regarding the
mean and the hypothesis regarding the variance; however one
usually presumes the sample variances are stable from sample to
sample and any one sample variance is an unbiased estimator of
the population variance. As such, hypothesis testing is most
frequently associated with testing assumptions regarding the
population mean.
Hypothesis Testing
Test the assumption
H0: μ = 120 vs. H1: μ ≠ 120
using a level of significance α = 5%
Note: If our sample came from the assumed
population with mean μ = 120, then we would expect
95% of all sample means of sample size n = 42 to be
within ± Zα/2 = ± 1.96
Confidence Interval 95%
Level of Significance a = 5%
95%
a / 2 = 2.5%
-Za/2 = -1.96
a / 2 = 2.5%
+Za/2 = +1.96
Calculate Upper and Lower Bounds on X
XLower = μ – Zα/2 (s /√n) = 120 – 1.96(1.09) =117.9
XUpper = μ + Zα/2 (s /√n) = 120 + 1.96(1.09) =122.1
Confidence Interval 95%
Level of Significance a = 5%
95%
a / 2 = 2.5%
a / 2 = 2.5%
μ = 120
-Za/2 = -1.96
X Lower = 117.9
+Za/2 = +1.96
X Upper = 122.1
Hypothesis Testing Comparisons
Compare our sample mean X = 122.4
To the Upper and Lower Limits.
Confidence Interval 95%
Level of Significance a = 5%
95%
a / 2 = 2.5%
a / 2 = 2.5%
μ = 120
-Za/2 = -1.96
X Lower = 117.9
X = 122.4
+Za/2 = +1.96
X Upper = 122.1
Hypothesis Testing Conclusions
• Note: Our sample mean X = 122.4 falls outside of the
95% Confidence Interval.
We can reach one of two logical conclusions:
One, that we expect this to occur for 2.5% of the
samples from a population with mean μ = 120.
Two, our sample came from a population with a
mean μ ≠ 120.
• Since 2.5% = 1/40 is a rather “rare” event; we opt for the
conclusion that our original null hypothesis is false and we
reject H0: μ = 120 and therefore accept vs. H1: μ ≠ 120 .
Confidence Interval 95%
Level of Significance a = 5%
μ ≠ 120
Conclude μ ≠ 120
X = 122.4
Alternate Method
• Rather than compare the sample mean to the 95%
lower and upper bounds, one can use the
Z Transformation for the sample mean and compare
the results with ± Zα/2.
• Z0 = ( X – μ ) / (s / √n) = (122.4 – 120) / 1.09 = 2.20
Confidence Interval 95%
Level of Significance a = 5%
95%
a / 2 = 2.5%
a / 2 = 2.5%
Z0 = 2.20
-Za/2 = -1.96
+Za/2 = +1.96
Alternate Method
Note: Since Z0= 2.20 value exceeds Zα/2 =1.96, we
reach the same conclusion as before;
Reject H0: μ = 120 and Accept H1: μ ≠ 120.
Alternate Method - Extended
We can quantify the probability (p-Value) of
obtaining a test statistic Z0 at least as large as our sample Z0.
P( |Z0| > Z ) = 2[1- Φ (|Z0|)]
p-Value = P( |2.20| > Z ) = 2[1- Φ (2.20)]
p-Value = 2(1 – 0.9861) = 0.0278 = 2.8%
Compare p-Value to Level of Significance
If p-Value < α, then reject null hypothesis
Since 2.8% < 5%, Reject H0: μ = 120 and conclude μ ≠ 120.