1. 8/14/2012
Statistical Hypothesis
Basic elements of TOH
Estimation and TOH
• Hypothesis -- assertion about a parameter the truth of
Parameter which is to be inferred based on sample/relevant statistic
• Null hypothesis (H0) vs. Alternative Hypothesis (H1)
mean proportion Standard • Two kinds of error (Type I error and Type II error)
deviation D e c i s io n D o not R e je ct H 0
Single T ru th r eje c t H 0
Population
H 0 is C o rrec t T ype I
Two
co rrect d e c is i o n e rro r
Multiple H 1 is T yp e II C o rre ct
co rrect erro r d e c is i o n 3
• The two errors are NOT typically equi-important and this
decides which one should be the null hypothesis
Is Medworld Cheating?
• A test is usually specified by fixing the critical region (CR)
(you reject H0 if the sample falls here) or equivalently the
A ‘500mg’ tablet should contain 100 mg of the medicine
acceptance region which is its complement. and 400 mg of ‘filler’. A complaint has been registered
that the drug company is giving more fillers than
• Given a test (equivalently, a CR or the cutoff point), one
stipulated. In order to validate the charge, the inspector
would like to compute the probabilities of Type I (and II) error
to gauge the consequences of wrong decisions
decides to check the content of 50 randomly sampled
tablets. When should she decide that drug company is
• With n fixed, P(type I error) increases with decrease in P(type
NOT sticking to the norms?
II error) and vice versa.
• The usual approach is
– Decide on acceptable level (called level of significance), α, for P(type I X → average filler content in the 50 tablets sampled
error) Action against the company should be taken provided X > ??
– determine the cutoff so that P(type I error) = α
4 5
Is Medworld cheating?
µ : true average weight of fillers (in mg) per tablet Problem
H0: µ = 400 vs. H1: µ >400
C.R. is X >c The telescope manufacturer wants its telescopes to have standard
Let as consider a test at 5% level of significance.
deviations in resolutions to be significantly below 2 when focusing
0.05 = P[ rejecting H 0 | H 0is true] on objects 500 light-years away. When a new telescope is used to
c − 400 focus on an object 500 light-years away 30 times, the (sample)
= P[ X > c | µ = 400] = P[ Z > ] standard deviation turns out to be 1.46.
σ
n Should this telescope be sold?
c − 400
So = 1.645 or c = 400 + 1.645 σ
σ n
n
So the C.R. is X > 400 + 1.645 σ
n
X − 400 Test Statistic
or , equivalently > 1.645
σ 7
n
1
2. 8/14/2012
Solution to the telescope problem telescope problem
Have to choose between two hypothesis:
σ ≥2 (product not ready) and σ<2 (product ready) H 0 : σ = 2 vs H1 : σ < 2
We set the NULL hypothesis as σ ≥2 and look to reject it in favour of the
ALTERNATIVE hypothesis σ<2 if S (sample standard) < c (cutoff)
n=30 S=1.46 Test at level α=0.01
As it would be more serious error to float the product if it’s not ready
(than not to float if it is ready).
How much error of the 1st kind (Type I error) can you live with? (n − 1) S 2 2
= χ 29
Test Statistic
Say it’s 5% (called Significance level of the test or α) 4
Cutoff c can be obtained from this requirement:
0.05 = Max P[rejecting Null hypothesis when it’s true) C.R. at level α=0.01, TS < 14.256
= Max P[S < c | σ ≥2 ] = P[S < 2c | σ = 2 ]2
(n − 1) S (30 − 1)c 2
29c 29 ×1.46 2
= P[ < | σ = 2] ⇒ = 17.708 ⇒ c = 1.57 Observed value = = 15.4541
σ2 22 4 4
Since observed S = 1.46 < 1.57, we reject null hypothesis at 5% level and So fail to Reject H0 at α=0.01. So the telescope should NOT be sold
decide to float the product
Change the level of significance
Telescope problem p-value
H 0 : σ = 2 vs H1 : σ < 2
What would have been the decision had the test been
n=30 S=1.46 Test at level α=0.05
carried out at level α=0.025?
(n − 1) S 2 2
= χ 29
Test Statistic Calculate the tail area corresponding to the observed value
4 of the TS, namely 15.4541
C.R. at level α=0.05, TS < 17.708 2 lies between 0.01 and 0.025
P[ χ 29 < 15.4541]
29 ×1.46 2 (can be found =1.88% exactly using EXCEL
Observed value = = 15.4541 Or any statistical package)
4
So Reject H0 at α=0.05. So the telescope SHOULD be sold This number is known as p-value of probability value of a test.
Steps in Testing hypothesis
1. Determine H0 and H1
P-Value approach to Testing: 2. Checking the set-up:
1. hypothesis about which parameter µ/σ/π ? One/two sample ?
• P-value is the prob. of committing type I error if H0 is 2. one tailed or two-tailed test
3. side condition (e.g. σ known/unknown incase of testing for µ)
rejected on the basis of given data set.
4. assumption needed
• p-value is the smallest level at which H0 can be rejected for 3. Formulate the test statistic and decide on its distribution
the given data. (reject H0 at level α if p-value ≤ α)
4. Given α, determine the C.R.(draw diagram)
• Usual rule for interpreting p-value: 5. Draw a random sample and observe the value of T.S.
– p-value < 0.01 ⇒ test is significant 1. does the value fall in the C.R.?(mark it)
– p-value > 0.20 ⇒ test is NOT significant 6. Reject (or fail to reject) H0 at level α and conclude that
• Exact computation may not always be possible based on there is (no) significant evidence against H0
the tables in the text. 7. Interpretation of the decision
• Two-tailed test : p-value = 2* 1-sided tail probability
• Comparison between the two approaches 8. In the p-value approach: step 4 & 5 are sort of swapped
– interchange of order of steps
2
3. 8/14/2012
Solution to Practice Problem 1
Practice problem 1 • H0 : µ= 10 and H1: µ≠10
• Checking the set-up:
– hypothesis about µ (σ unknown) ; One sample problem;
A television documentary on overeating claimed that Americans
– n=18 (small) ; two-tailed test
are about 10 pounds overweight on average. To test this claim,
– assumption: excess wt in Americans has a Normal
eighteen randomly selected individuals were examined; their distribution
average excess weight was found to be 12.4 pounds, and the • Test statistic is = X − 10 which has a t-dist. with 17d.f.
T
standard deviation was 2.7 pounds. At a significance S
18
level of 0.01, is there any reason to doubt the validity of the 12.4 − 10
T = = 3.771
claimed 10-pound value? •Given α=0.01, the C.R. is |T| > 2.898
2.7
18
x
•Observed value of the T.S.
•falls in the C.R.
-2.898 2.898
•Reject H0 at 1% level of significance and conclude that there is significant
evidence to doubt the validity of the claimed 10-pound value.
Solution to Practice Problem 1
Testing for mean
p-value approach
(s.d. unknown; small sample; • H0 : µ= 10 and H1: µ≠10
Normal population) • Checking the set-up:
– hypothesis about µ (σ unknown) ; One sample problem;
– n=18 (small) ; two-tailed test
H 0 : µ = µ0 – assumption: excess wt in Americans has a Normal
distribution
X − µ0 X − 10
• Test statistic is T = S which has a t-dist. with 17d.f.
Test Statistic Tn−1 = 18
S
n •Observed value of the T.S. 12.4 − 10
T = = 3.771
•So the p-value 2.7
which has t − distribution with (n − 1) d.f • = 2 * P(T17 > 3.771) ≈ 0.001
18
when H 0 is true •Test is strongly significant, Reject H0 even at 0.5% level of significance
and conclude that there is significant evidence to doubt the validity of the
claimed 10-pound value.
3