hypothesis testing -...
TRANSCRIPT
HYPOTHESIS TESTING
Prepared by
Roderico Y. Dumaug, Jr.
For Intro to Statistics
Dr Jitendra dabral
Objectives
1) Able to formulate statistical hypothesis2) Discuss the two types of errors in hypothesis
testing3) Establish a decision rule for accepting or
rejecting a statistical hypothesis at a specified level of significance
4) Distinguish between the one-sample case and two-sample case tests of hypothesis concerning means
5) Choose the appropriate test statistics for a particular set of data.
Symbols Applicable1) Ho – Null Hypothesis 2) H1 – Alternative Hypothesis3) β – Greek Letter Beta which is the probability of committing a Type 2
Error4) α – Greek letter Alpha which denotes a probability of committing a
Type 1 Error and is known as the Level of Significance5) z6) σ – Greek letter Sigma which means the Variance7) σx - the standard deviation of the sampling distribution of the mean8) µ - Greek letter ‘mu’ which is the mean of the normal population9) n – Sample size10) - Sample mean11) t – t distribution; a case where the population standard deviation is
unknown12) s – standard deviation
Hypothesis Testing: Introduction
• Theory of Statistical Inference: Consists of methods which one makes inferences or generalizations about a population. Example is the Tests of Hypothesis.
• Population vs. Random Sample
Statistical Hypothesis
• Definition: A statistical hypothesis is an assertion or conjecture concerning one or more populations.
An assumption or statement, which may or may not be true concerning one or more population.
• Two types of Statistical Hypothesis:
a) The NULL HYPOTHESIS, Ho
b) The ALTERNATIVE HYPOTHESIS, H1
a) Nondirectional Hypothesis– Asserts that one value is different from another (or others). Also called as the 2-sided Hypothesis. “Not equal to” or ≠.
a) Directional Hypothesis – An assertion that one measure is Less than (or greater than) another measure of similar nature. Also called the 1-sided Hypothesis. “<“ or “>”
Examples of Statistical Hypothesis1) Ho: The average annual income of all the families in the City is
Php36,000 (µ = Php 36,000). H1 : The average annual income of all the families in the City is not Php36,000 (µ ≠ Php36,000).
2) Ho: There is no significant difference between the average life of brand A light bulbs and that of brand B light bulbs (µA = µB).H1 : There is a significant difference between the average life of brand A light bulbs and that of brand B light bulbs (µA ≠ µB).
3) Ho: The proportion of Metro Manila college students who prefer the taste of Papsi Cola is ²/₃(p = ²/₃)H1 : The proportion of Metro Manila college students who prefer the taste of Papsi Cola is less than ²/₃(p < ²/₃).
4) Ho: The proportion of TV viewers who watch talk shows from 9:00 to 10:00 in the evening is the same on Wednesday and Fridays (p1 = p2)H1 : The proportion of TV viewers who watch talk shows from 9:00 to 10:00 in the evening is greater on Wednesday than on Fridays (p1 > p2).
Two types of Errors• Four possibilities on the Acceptance and
Rejection of a Ho: Consequences of Decisions in Testing Hypothesis
DECISION/FACT Ho is TRUE Ho is FALSE
ACCEPT Ho: CORRECT DECISION TYPE 2 ERROR denoted by β
REJECT Ho:TYPE 1 ERROR denoted by α
CORRECT DECISION
αP (Type 1 Error)
P(Rejecting Ho when Ho is TRUE)
βP(Type 2 Error)
P(Not Rejecting Ho when Ho is FALSE)
Elements of a Test of a Hypothesis
• Null Hypothesis (Ho)
• Alternative Hypothesis (H1)
• Test Statistic: A sample statistic used to decide whether to reject the null hypothesis
• Rejection Region
• Calculation of Test Statistic
• Conclusion: Numerical Value falls in the Rejection Region or not
Level of Significance
• To specify the Probability of committing a Type 1 Error, α, which is popularly known as the Level of Significance
• We can determine the Critical Values which define the: – Region of Rejection (or Critical Region) and
– Region of Acceptance
• The Critical Value serves as the basis for either Accepting or Rejecting a Hypothesis.
• When α = .05, the Region of Rejection is 0.05 and the Region of Acceptance is 0.95
One-Tailed and Two Tailed Tests• Where H1 is Directional, One-Tailed Test
• Where H1 is Non-Directional, Two-Tailed TestTYPE OF TESTS DIFFERENCE
One-Tailed TestRegion of Rejection lies entirely in one end of the distribution. Hypothesizing a Range of Values
Two Tailed TestInvolves a Critical Region which is split into two equal parts placed in each tail of the distribution. A value of the parameter is being hypothesized.
Mathematical Formulation of H1 Region of Rejection
Greater Than ( >)Area of Rejection is placed entirely in the Right Tail of the Distribution
Less Than ( < ) Region of Rejection is in the Left Tail
Not Equal To (≠)Both Tails contain Equal areas serving as Critical Regions
Example: What form of Hypothesis Should be Used
• A civic organization is conducting a study to determine whether the proportion of women who smoke has increased since last study.
• A garment manufacturer suspects that that average order size for units of men’s underwear has decreased from last year’s.
• A doctor claims that the average age of heart attack patient is 45.
Let θ be the proportion of women who smoke during the last study
Therefore, Ho: θ = θo
H1: θ > θo
Let θ be the average order size for units of men’s underwear last year
Therefore, Ho: θ = θo
H1: θ < θo
Let θ be the average age of heart attack
Therefore, Ho: θ = 45H1: θ ≠ 45
Example:
• Given: z = 1.645, α = 0.05
Region of rejectionArea = 0.05
Region of AcceptanceArea = 0.95
1.645Right TailLeft Tail
Example:
• Given: z = -2.33, α = 0.01
Region of rejectionArea = 0.01
Region of AcceptanceArea = 0.99
-2.33
Example: Two Tailed
• Given: critical z values are ±1.96, α = 0.05
Region of rejectionArea = 0.025
Region of AcceptanceArea = 0.95
1.96-1.96
Region of rejectionArea = 0.025
Critical Regions In Testing Hypothesis• Rejecting Ho
Level of Significance\ Type of Test One-Tailed Two-Tailed
Reject Ho
Computed value of z is GREATER than the Critical Value
z > zo z > zo
Computed value of z is LESS than the Negative Critical Value
z < - zo z < -zo
Steps in Hypothesis Testing
1) Formulate the Ho and the H1
2) Specify the level of significance α
3) Choose the appropriate test statistic
4) Establish the critical region
5) Compute for the value of the statistical test
6) Make a decision and, if possible, draw aconclusion
Test Concerning Means (from normally distributed data)
OUTLINEI. One Sample Test (One Population)
A. σ2 is known (assume that the population variance is known)
B. σ2 is unknown (the population variance is unknown)
II. Two Sample Test (One Population)
A. σ12 and σ2
2 are known
B. σ12 = σ2
2 = σ2 are unknown
C. k sample test
Test Concerning Means (from normally distributed data
I. One Sample Test (One Population)A. σ2 is known (assume that the population variance is known)
Conditions: We hypothesized that the MEAN of a Normal Population with a variance of σ2 is µo . We take a random sample of size n from this population and obtain a sample mean of which is somewhat different from µo .
To determine whether or not the observed difference between the computed value and the hypothesized µo is significant, we formulate the following hypothesis.
1) Ho: µ = µo 2) Ho: µ = µo 3) Ho: µ = µo
H1 : µ < µo H1 : µ ≠ µo H1 : µ >µo
Test Concerning Means (from normally distributed data
A. σ2 known (assume that the population variance is known)
Since the parameter σ is known, the Z statistics is employed as the test statistics. Consequently, the z score corresponding to is:
where the denominator σx represents the standard error of the mean ( or the standard deviation of the sampling distribution of the mean) and is computed by the formula:
x
o xz
nx
Supposed α = 0.05 and the critical values are 1.96 and -1.96 then the ff decision rules applies:1. Reject Ho and accept H1, if z > 1.96 or z < -1.962. Cannot reject Ho (Accept H1), if z is within
the interval between -1.96 and 1.96
Test Concerning Means (from normally distributed data
A. σ2 known (assume that the population variance is known)
Rejection Region:
ZZ
2
ZZ
2
ZZ
ZZ
500,8x
A. σ2 known (assume that the population variance is known)
Example: One community college hypothesized that the mean starting monthly salary of its graduates is Php9000 and a stand deviation of Php1,000. A sample of 100 graduates were questioned and it was found that the average starting salary is Php8,500.00. Test this hypothesis at 5% level of significance.
Given: µo = 9,000 σ = 1,000 n = 100
vs.
Test Concerning Means (from normally distributed data
000,9:H.)ao
000,9:H1
05.0.)b
96.1ZZ.)c025.
2
05.
59000500,8
n
xZ.)d
100
1000
o
96.15
Compare.)e
-1.96 1.96
Region of AcceptanceArea: 0.95
Region of RejectionArea: 0.025
Region of RejectionArea: 0.025
-5
TWO-TAILED TESTConclusion: REJECT HO
The data provide sufficientevidence to contradict the hypothesized mean of Php9000, it is actually LESSTHAN Php9000
Test Concerning Means (from normally distributed data
A. σ2 known (assume that the population variance is known)
Example: The average height of males in the freshmen class of a certain college has been 68.5 inches, with a standard deviation of 2.7 inches. Is there a reason to believe that there has been an increase in the average height if a random sample of 50 males in the present freshmen class have an average height 69.7 inches? Test at 0.025 level of significance.
Given: µo = 68.5 σ= 2.7
Steps:
vs.
7.69x
5.68:H.)ao
5.68:H1
025.0.)b
96.1Z.)c025.0
143.383818376516.0
2.1
071068.7
7.2
2.1
50
7.2
5.687.69
n
xZ.)d o
One-Tailed Test96.1143.3
Compare.)e
1.96
Region of RejectionArea: 0.025
Region of AcceptanceArea: 0.975
3.143
Conclusion: REJECT HO
The data provide sufficientevidence to indicate that the mean height is GREATER THAN 68.5 inches
Test Concerning Means (from normally distributed data
B. σ2 is unknown (the population variance is unknown)
When the population standard deviation σ is unknown and thesample size n is less than 30, the T statistic is appropriate. The tvalue corresponding to a mean x of a sample taken from anormal population is
With df = n – 1, where estimated standard error of thesampling distribution . Thus, to test the hypothesis µ=µo againstany suitable alternative when σ is unknown and n < 30,
s
xt
x
sn
sx
x
n
s
xt o
With df = n -1
Test Concerning Means (from normally distributed data
B. σ2 is unknown (the population variance is unknown)
Rejection Region:
tT )1n(, tT )1n(,
)1n(,2
tT
)1n(,2
tT
Test Concerning Means (from normally distributed data
B. σ2 is unknown (the population variance is unknown)
Example: A major car manufacturer wants to test a new engine to see whether it meets new airpollution standards. The mean µ of all engines of this type must be less than 20 partsper million of carbon. Ten engines are manufactured for testing purposes, and themean and standard deviation of the emission for this sample of engines weredetermined to be:
s = 3.0 parts/million
Do the data supply evidence to allow the manufacturer to conclude that this type of enginemeets the pollution standard? Assume that the manufacturer is willing to risk a Type 1error with probability α = 0.01.
Given: µo = 20 n = 10 s = 3.0
million/parts1.17x
1.17x
06.3
10
0.3
201.17
n
s
xT.)d 0
821.2ttt.)c9,01.0)110(,01.0)1n(,
01.0.)b
20:H1
.vs20:H.)ao
One-Tailed Test
-2.821
Region of RejectionArea: 0.01
Region of AcceptanceArea: 0.99
821.206.3
Compare.)e
Conclusion: REJECT HO
The data provide sufficientevidence that the engine type meets pollution control
-3.06
Test Concerning Means (from normally distributed data
B. σ2 is unknown (the population variance is unknown)
Example: Suppose a pharmaceutical company must demonstratethat a prescribed dose of a certain new drug will result inaverage increase in blood pressure of less than 3 points. Assumethat only six patients can be used in the initial phase of humantesting. Result: the six patients have blood pressure increase of1.7, 3.0, 0.8, 3.4, 2.7, and 2.1 points. Use the results todetermine if there is evidence that the new drug satisfies therequirement that the resulting increase in blood pressureaverages less than 3 points.
Given:
95.0901666.030
05.27s
30
69.18774.214
30
69.187)79.35)(6(
)1n(n
)x(xns
22
28.2x 95.0s
3:H.)ao
.vs 3:H0
01.0.)b
365.3ttt.)c5,01.0)16(,01.0)1n(,
86.1
6
95.0
328.2
n
s
xT.)d 0
One-Tailed Test
-3.365
365.386.1
Compare.)e
-1.86
Region of RejectionArea: 0.01
Region of AcceptanceArea: 0.99
Conclusion: DO NOT REJECT HO
The data do not provide sufficient evidence to conclude that the mean increase in blood pressure resulting from taking the drug is less than 3
Test Concerning Means (from normally distributed data)
OUTLINEI. One Sample Test (One Population)
A. σ2 is known (assume that the population variance is known)
B. σ2 is unknown (the population variance is unknown)
II. Two Sample Test (One Population)
A. σ12 and σ2
2 are known
B. σ12 = σ2
2 = σ2 are unknown
C. k sample test
Test Concerning Means (from normally distributed data
II. Two Sample Test (One Population)Test on the difference in Means
A. σ12 and σ2
2 are known
1) Ho: µ1-µ2 = µo 2) Ho: µ1-µ2 = µo 3) Ho: µ1-µ2 = µo
H1 : µ1-µ2 < µo H1 : µ1-µ2 ≠ µo H1 : µ1-µ2 >µo
Test Statistic:
2
2
2
1
2
1
o21
nn
)xx(Z
Test Concerning Means (from normally distributed data
II. Two Sample Test (One Population)
Rejection Region:
Note:
i. µo = 0
ii.µ1 - µ2 < µ0 µ1 < µ2, µ2 > µ1
iii.µ1 - µ2 > µo µ1 > µ2, µ2 < µ1
zZ
2
zZ
2
zZ
zZ
Test Concerning Means (from normally distributed data
II. Two Sample Test (One Population)
Example: A university investigation, conducted to determine whether car ownership if students affect their academic achievement, was based on two random samples of 100 students, each drawn from the student body. The average and standard deviation of each group’s GPA (grade point average) are as shown.
Non-Car owners (n1=100) Car Owners (n2=100)GPA GPA
Do the data present sufficient evidence to indicate a difference in the mean achievement between car owners and noncar owners? Test using α=0.10
Define: µ1 = mean GPA for Non-car owners; µ2 = mean GPA for Car owners; µ0 = 0
54.2x 2 70.2x 1 63.0s260.0s
1
0:H.)a210 .vs 0:H
211
10.0.)b
645.1zzz.)c05.0
2
10.0
2
84.1
100
)63(
100
)6(
)54.270.2(
nn
)xx(Z.)d
22
2
2
2
1
2
1
021
Two-Tailed Test
-1.645 1.645
645.184.1
Compare.)e
Region of RejectionArea: 0.05
Region of RejectionArea: 0.05
Region of AcceptanceArea: 0.90
Conclusion: REJECT HO
The data provide sufficient evidence to indicate a difference in the mean achievement between car owners and non-car owners, in fact non car owners have better academic performance than car owners.
1.84
Test Concerning Means (from normally distributed data
II. Two Sample Test (One Population)Test on the difference in Means
B. σ12 = σ2
2 = σ2 are unknown
1) Ho: µ1-µ2 = µo 2) Ho: µ1-µ2 = µo 3) Ho: µ1-µ2 = µo
H1 : µ1-µ2 < µo H1 : µ1-µ2 ≠ µo H1 : µ1-µ2 >µo
Test Statistic:
where
21
p
o21
n
1
n
1S
)xx(T
2nn
s)1n(s)1n(S
21
2
22
2
11
p
Test Concerning Means (from normally distributed data
II. Two Sample Test (One Population)Test on the difference in Means
B. σ12 = σ2
2 = σ2 are unknown
Rejection Region:
)22n1n(,tT
)22n1n(,2
tT
)22n1n(,2
tT
)22n1n(,
tT
Test Concerning Means (from normally distributed data
B. σ12 = σ2
2 = σ2 are unknownExample: A television network wanted to determine whether sports events
or first run movies attract more viewers in the prime-time hours. It selected 28 prime-time evenings; of these, 13 had programs devoted to major sports events and the remaining 15 had first –run. The number of viewers (estimated by a television viewer rating firm) was reported for each program. If µ1 is the mean number of sports viewers per evening and µ2 is the mean number of movie viewers per evening, is there a difference in the mean number of viewers at 0.05 level of significance?
The TV network’s samples produce the results below:
Sports: n1 = 13 s1 = 1.8 million Movies: n2 = 15 s2 = 1.6 million
million8.6x 1
million3.5x 2
Where:
0:H.)a21o .vs 0:H
211
05.0.)b
056.2tt.)c26,025.0
)22n1n(,2
34.2
15
1
13
169.1
0)3.58.6(
n
1
n
1Sp
)xx(T.)d
21
021
69.121513
)6.1)(115()8.1)(113(
2nn
s)1n(s)1n(Sp
22
21
2
22
2
11
056.234.2
Compare.)e
Two-Tailed Test
-2.056 2.056 2.34
Region of RejectionArea: 0.025
Region of RejectionArea: 0.025
Region of AcceptanceArea: 0.95
Conclusion: REJECT HO
The data provide sufficient evidence to indicate a difference in the mean achievement between car owners and non-car owners, in fact non car owners have better academic performance than car owners.