Statistics: Shaheena Bashir
Statistics: Shaheena Bashir
Statistics
Inferential Statistics
Hypothesis Testing
Shaheena Bashir
FALL, 2019
2/36
Outline
Hypothesis Testing
Tests for Single Population Mean:Tests involving Normal
Distribution
Test for Single Population Mean: Large Sample
Test for Single Population Mean: Small Sample σ unknown
Statistical Inference
I Point Estimation
I Interval Estimation
I Hypothesis Testing o
4/36
Hypothesis Testing
Hypothesis
o
5/36
Hypothesis Testing
o
6/36
Hypothesis Testing
o
7/36
Hypothesis Testing
Concepts
o
8/36
Hypothesis Testing
o
9/36
Hypothesis Testing
Exercise
Formulate the null & the alternative hypothesis for each case:
I The automobile engine emission is 100 mg/sec.
I The average score of hockey players in a year is less than 10
I The average age of accountants is greater than 25.4 years
I The average pulse rate of marathon runners is less than 70
beats per minute
I The average yield of wheat crop is 5000 kg
o
10/36
Hypothesis Testing
o
11/36
Hypothesis Testing
o
12/36
Hypothesis Testing
Decision
Reject Ho Do not Reject Ho
Ho True Type I error (α) Correct Decision
False positive True negative
Ho False Correct Decision Type II error (β)
True positive (1 − β) False negative
I Power of test (Sensitivity): The probability of not
committing Type II error, i.e., .................. 1 − β
I Specificity: The probability of not committing Type I error,
i.e., ..................1 − α
o
13/36
Hypothesis Testing
o
14/36
Hypothesis Testing
o
15/36
Hypothesis Testing
o
16/36
Hypothesis Testing
Exercise
o
17/36
Hypothesis Testing
Exercise
o
18/36
Tests for Single Population Mean:Tests involving Normal Distribution
Test for Single Population Mean: Large Sample
o
20/36
Tests for Single Population Mean:Tests involving Normal Distribution
Test for Single Population Mean: Large Sample
Example
o
21/36
Tests for Single Population Mean:Tests involving Normal Distribution
Test for Single Population Mean: Large Sample
o
23/36
Tests for Single Population Mean:Tests involving Normal Distribution
Test for Single Population Mean: Small Sample σ unknown
Student’s t-distribution
I If parent population is normal, then x̄ ∼ N(µ, √σn ) &
x̄−µ
√ ∼ N(0, 1)
Z = σ/ n
I For non-normal population, then x̄ ≈ N(µ, √σn ) &
Z ∼ N(0, 1), if n is large
x̄−µ
√ ∼ tn−1 .
I For small sample size & σ unknown, then t = s/ n
Comparison of t Distributions
0.4
Distributions
df=1
df=3
df=8
df=30
0.3
normal
Density
0.2
0.1
o
0.0
24/36
Tests for Single Population Mean:Tests involving Normal Distribution
Test for Single Population Mean: Small Sample σ unknown
Example
Does the data indicate that the mean DL reading for current
smokers are lower than 100 DL, the average for non-smokers?
o
26/36
Tests for Proportion
Z -test for Population Proportion
o
28/36
Tests for Proportion
Z -test for Population Proportion
Example
A peony plant with red petals was crossed with another plant
having streaky petals. A geneticist states that 75% of the offspring
resulting from this cross will have red flowers. To test this claim,
100 seeds from this cross were collected and germinated and 58
plants had red petals. Test geneticist’s claim.
o
29/36
Tests based on χ2 -distribution
χ2 -distribution
o
30/36
Tests based on χ2 -distribution
χ2 -test for Variance
(n − 1)s 2
χ2 =
σo2
Example
o
32/36
Tests based on χ2 -distribution
Contingency Table
Contingency Table
Example
I Is there any association between the gender & the presence in
the office next day after Eid?
I The proportion of employees present are
45/57 = 0.79 & 114/124 = 0.92 for females & males
respectively.
I Do female employees take day off more than the male
employees after Eid?
o
34/36
Tests based on χ2 -distribution
χ2 -test for Independence in Contingency Table
I Ho : p1 = p2 = · · · = pk
I Ha : At least 1 proportion is different from others
I The computational procedure is the same as for test of
independence
o
36/36
Tests based on χ2 -distribution
χ2 -test for Homogeneity of Proportions
Example
Migraine headache patients took part in a double-blind clinical trial
to assess experimental surgery. 75 patients were randomly assigned
to real surgery on migraine trigger sites (n1 = 49) or sham surgery
(n2 = 26) in which an incision was made but nothing else. The
surgeons hoped that patients would experience ‘a substantial
reduction in migraine headaches. Does real surgery substantially
reduce migraine headache?