Download PART4Tests of HYPOTHESES

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
TESTS
OF
HYPOTHESES
1
Engineers and Managers are dealing with
the following CASES Frequently
A Car Tires Producer is claiming that the
Mean Life time of a tire is more than 60 000 km
A Sample of 16 tires are RANDOMLY selected
and tested for life.
The results of the experiments are given below
60613 59836 59154 60252 59784 60221 60311 50040 60545
60257 60000 59997 69947 60135 60221 60523
Do these results support the claim
of the producer or not ?
A Diet and aerobic program in a club
is claimed to reduce the weight by at least 7 kg.
Ten persons participated in the program and
The following results have been obtained
Person
1
2
3
4
5
6
7
8
Before
87 95 110 89 83 93 96 110 131 138
After
80 84 98
84 76 82 88 98
9
10
123 127
On the basis of the test results,
Is there any evidence to support the club claim
A Sample of 50 components is taken from
a production run. It is believed (hypothesized)
that the failure probability of the component
is 0.01. On test 3 of them are found faulty.
Is this enough evidence to disbelieve the Statement
concerning the failure Probability?
TESTS OF HYPOTHESES
NORMAL POPULATIONS
NON-NORMAL POPULATIONS
NORMAL POULATIONS
KNOWN POPULATION VARIANCE
UNKNOWN POPULATION VARIANCE
KNOWN POPULATION VARIANCE
Two Samples
Z
Tests
Single Sample
Z
Tests
UNKNOWN POPULATION VARIANCE
More than Two Samples
ANOVA Tests
Single Sample T Tests
Two Samples T Tests
Nearly Equal Population Variances
Non Equal Population Variances
Statements of Tests
 Ho: The BASIC Hypothesis

to be tested

(whether Accept or Reject)

 H1: The Alternative Hypothesis

( Negation of Ho )
Ho
Reject
Accept
True
Type I Error
False
No Error
α
1- α
No Error
1- β
α
Type II Error
β
= Probability of committing Type I error
Level of SIGNIFICANCE
β = Probability of committing Type II error
1 – β = Power of Test
Tests of Hypothesis on
the MEAN
Statements of Test
Ho: μ = μo
H1: μ ≠ μo Two-Sided Test OR
: μ > μo
: μ < μo
Upper –Sided Test OR
Lower –Sided Test
Step 3
Determination of zone of Acceptance of Ho
The Sample Mean X is Normal Given α level of Significance
Two Sided Tests
REJECT
REJECT
ACCEPT
Ho :
  O
H1 :
  O
Upper Sided Tests
REJECT
ACCEPT
Ho :
  O
H1 :
  O
Lower Sided Tests
REJECT
ACCEPT
Ho :
  O
H1 :
  O
Example 1
A Car Tires Producer is claiming that the Mean Life time of a tire is more than 60 000 km
A Sample of 16 tires are RANDOMLY selected and tested for life. The results of the
experiments are given below and the standard deviation is known to be 400 km
60613 59836 59154 60252 59784 60221 60311 50040 60545
60257 60000 59997 69947 60135 60221 60523
Do these results support the claim of the producer or not ?
Step 1: Statement of Test
Take α = 0.06
Ho : μ = 60 000 km
H1 : μ > 60 000 km
X  60114.75
Step 2: Experimental Data Processing
n  16
  400
Step 3: Build A Relevant TEST STATISTIC by means of which we can Test Hypothesis Ho
Since, population variance is known and X is a Normal variable, then
The Standard Normal Variable
ZO 
Z
is the relevant Test Statistic:
60114.75  60000 16  1.1475
X 

400

N


Step 4: Define The Zone of ACCEPTANCE
H1 : μ > 60 000 km
The Alternative Hypothesis H1 is
UPPER-SIDED, then the Rejection Zone is defined
As shown in the figure to the right
REJECT
ACCEPT
α = 0.06, then the( area to the left of Zα )= 0.94
Therefore , Zα = 1.555 (from tables or Excel)
0
Zα
α
Step 5: Perform the hypothesis test by Comparing Zo with Zα
If Zo > Zα, then we are in the REJECT zone, then we REJECT Ho
Otherwise, we are not in a position to Reject Ho
Zo = 1.1475 < Zα = 1.555, Therefore we ACCEPT (Can’t Reject) Ho
Step 6: CONCLUSION
Since we accept Ho, H1 (μ > 60000) is RREJECTED, then
THERE IS NO ENOUGH EVIDENCE TO STATE THAT
THE TIRE LIFE IS LONGER THAN 60 000 km
Example 2
A manufacturer is interested in the output voltage of a power supply used in a PC.
Output voltage is assumed to be normally distributed. With standard deviation 0.25 volts.
The manufacturer wishes to test Ho : μ = 5 volts against H1 : μ ≠ 5. using a sample of 9 units.
a) If the acceptance zone is 4.85 <= X <= 5.15. Find the value of the type I error α.
b) If the manufacturer wants to keep α = 0.05, where should be the acceptance region located
c) Find the power of test for detecting a true output voltage of 5.1 volts.
_______________________________________________________________________________
a) Statement of Test Ho : μ = 5 volts
H1 : μ ≠ 5 volts
1 - α
Acceptance Zone:

4.85 <= X <= 5.15
1    P 4.85  X  5.15

|
Reject
Accept
 5
4.85
5.15
  0.25
- Zα/2
Zα/2
 4.85  5
5.15  5
1    P
Z 
0.25 / 9
 0.25 / 9
1    P Z  1.8  P Z  1.8

  P  1.8  Z  1.8

1    0.96407  0.03593  0.92824
  0.07186
α/2

ZO 
X  O
 n

P LL  X  UL  P Z L  Z  ZU   1    0.95
Acceptance Zone in case of α = 0.05 From symmetry Z L   ZU
P  ZU  Z  ZU   2 P Z  ZU   1  0.95
P Z  ZU   0.975
Z L 1.96 
LL  5
0.25 / 9
Z U  1.96 
UL  5
0.25 / 9
UL  5.16333
LL  4.83667
α/2
c) The power of test for detecting a true output voltage of 5.1 volts.
β
is Probability of Accepting Ho when it is false
(
)
b = P 4.85 £ X £ 5.15 | m = mtrue = 5.1
æ 4.85 - 5.1
5.15 - 5.1 ö
b = Pç
£Z£
÷ = P ( -3 £ Z £ 0.6)
è 0.25 / 9
0.25 / 9 ø
b = P ( Z £ 0.6) - P ( Z £ -3) = 0.725 - 0.00135 = 0.723
β
Power of Test = 1 – β = 1 - 0723 = 0.277
β
μo
μT
β
μo μT
μo
μT
Example 3
The yield of a chemical process is being studied. From past experience, the standard
deviation is known to be 3. The past FIVE days of plant operation have resulted in
The following yields: 91.6, 88.75, 90.8, 89.95, 91.3. (use α = 0.05)
a) Is there evidence that the yield is not 90?
b) Is there evidence that the yield is less than 90?
c) Evaluate the P-Value of the test.
d) What sample size would be required to detect a true mean yield of 85 with probability
0.95.
e) What is the type II error probability , if the true mean yield is 92?
___________________________________________________
Step1: Statement of Test
Ho : μ = 90
H1 : μ ≠ 90
Step 2: Experimental Data Processing
X  90.48
n5
 3
Step 3: Build A Relevant TEST STATISTIC by means of which we can Test Hypothesis Ho
ZO 
90.48  90 5  0.3578
X 

3

N


Step 4: Define The Zone of ACCEPTANCE
H1 : μ ≠ 90
The Alternative Hypothesis H1 is
TWO-SIDED, then the Rejection Zones are
Symmetrically placed as shown in the figure
Reject
Reject
ACCEPT
α = 0.05, then (the area in the center part)= 0.95
And the Rejection areas on both sides, each = 0.025
Therefore , Zα/2 = Z at an area = 0.975 to the left
of Zα/2 = 1.96 (from tables or Excel)
0.975
Step 5: Perform the hypothesis test by Comparing Z o with Z α/2
0.025
Zα/2 = 1.96
Zo = 0.3578 < Zα/2 = 1.96, Therefore we ACCEPT Ho
Step 6: CONCLUSION
Since we accept Ho, H1 (μ ≠ 90) is RREJECTED, then
THERE IS NO ENOUGH EVIDENCE TO STATE THAT
THE MEAN YIELD of the chemical process is NOT 90
Example 4
Foam height of a shampoo is normally distributed with standard deviation of 20 mm. Test the hypothesis
HO : μ = 175 and H1 : μ > 175 using results of n=10 samples. Evaluate probabilities of type I and
type II errors if the critical region is X  185 and true mean found to be 195
.Construct the operating characteristic curves using values of true mean of 178, 181, 184, 187, 190,
193, 196 and 199.
_____________________________________________________________________________________
The Critical Zone is X  185 Then the Acceptance Zone is X  185

  175
20
1    P X  185
185  175 

1    P Z 
  P Z  1.58
20
/
10


1    0.943
  0.057
  P X  185 |   true  195

  P Z 

  0.057
185  195 
  P Z  1.58
20 / 10 
Critical Zone
Reject
α
Accept Zone
175
185
Z
1.58
1.11
0.63
0.16
-0.32
-0.79
-1.26
-1.74
-2.21
-2.69
-3.16
-3.64
beta
0.94
0.87
0.74
0.56
0.38
0.21
0.10
0.04
0.01
0.00
0.00
0.00
1.00
0.80
β
20 /
0.40
0.20
0.00
μTrue
  P X  185 |   true
185  true 

  P Z 


0.60
175
178
181
184
187
190
193
196
199
202
205
208
μTrue
175
178
181
184
187
190
193
196
199
202
205
208
10 
Operating Characteristic Curve
The P-Value of a Test
In order to decide whether ACCEPT or REJECT Ho WITHOUT HAVING α
The P-Value should be calculated as follows depending on the Statement of the Test
Φ(Z o)
H1 : μ ≠ μo
½
P  Value  21  ZO 
P-Value
Zo
H1 : μ > μo
P-Value
P  Value  1  ZO 
Zo
P  Value  Z O 
H1 : μ < μo
P-Value
RULE of DECISION by use of P-Value
If P-Value ≤ 0.01
REJECT Ho absolutely
If P-Value ≥ 0.1
ACCEPT Ho absolutely
Otherwise it is up to concerned parties
Zo
In the last exercise Example 2
H1 : μ ≠ 90
Z o = 0.3578
P  Value  21   Z O 
P  Value  21   0.3578  21  0.63975
P  Value  0.36  0.1
Therefore, we ACCEPT Ho
NO Evidence that the Yield is
NOT 90
FINDING The SAMPLE SIZE that enables Analysts
To DETECT The TRUE MEAN different from
Hypothetical MEAN with Given Power (1 - β)
SAMPLE SIZE
Enabling Analysts to DETECT
True Mean
which could be different from
Hypothesized Mean
TRANSFER OF COORDINATES
Z True 
Z-plane
X-plane
-X
μ
μ True
X
Z
 X

 
/ N
True   
/ N
0
Z 
X
 
/ N
As already mentioned before,
β is the probability of committing Type II error
That is Accepting Ho while it is False μ ≠ μo but μ = μT . Now consider:
  T  O
This difference could be positive or Negative
δ >0
 Z / 2
 N


- Zα/2
Z / 2
0
 N



 N
 N
  P  Z  / 2 
 Z  Z / 2 








 N
    Z  / 2 






Since δ


 N
    Z / 2 





Zα/2

 N

> 0, the second term in the above expression for β approaches to zero, therefore,

 N
    Z  / 2 







 N
 Z      Z  / 2 


Z   Z / 2 




 N



N  Z  / 2  Z  





δ <0
-Zα/2

  P  Z  / 2 


    Z  / 2 

 N
 N
 Z  Z / 2 



 N 
 N
  Z / 2 



 










0
Zα/2

N

Since δ < 0, the first term in the RHS of the above expression for
β approaches to one, therefore,
2
  T  O

 N
  1     Z  / 2 







 N
1       Z  / 2 



 N
 Z1       Z  / 2 




N  Z  / 2  Z1  









Z1    Z  / 2 
2
 N

Summary
δ >0
δ <0

 N
    Z  / 2 







 N
  1     Z  / 2 




N  Z  / 2  Z  















N  Z  / 2  Z1  


2



2
Example 3
The yield of a chemical process is being studied. From past experience, the standard
deviation is known to be 3. The past FIVE days of plant operation have resulted in
The following yields: 91.6, 88.75, 90.8, 89.95, 91.3. (use α = 0.05)
a) Is there evidence that the yield is not 90?
b) Is there evidence that the yield is less than 90?
c) Evaluate the P-Value of the test.
d) What sample size would be required to detect a true mean yield of 85 with probability
0.95.
e) What is the type II error probability , if the true mean yield is 92?
___________________________________________________
Step1: Statement of Test
Ho : μ = 90
H1 : μ ≠ 90
Step 2: Experimental Data Processing
X  90.48
n5
 3
Step 3: Build A Relevant TEST STATISTIC by means of which we can Test Hypothesis Ho
ZO 
90.48  90 5  0.3578
X 

3

N


Step 4: Define The Zone of ACCEPTANCE
The Alternative Hypothesis H1 is
TWO-SIDED, then the Rejection Zones are
Symmetrically placed as shown in the figure
Zα/2 = 1.96
Reject
Reject
Accept
Step 5: Perform the hypothesis test by Comparing Z o with Z α/2
Zo = 0.3578 < Zα/2 = 1.96, Therefore we ACCEPT Ho
P  Value  Z O   0.64
) What sample size would be required to detect a true mean yield of 85
with probability 0.95.
  T   O  85  90  5


N  Z  / 2  Z1  


2

0.375



  (1.96  1.64) 3  5

2
 4.678  5
What is the type II error probability (β), if the true mean yield is 92%?
  True  O  92  90  2

 N
    Z  / 2 


(positive)


2 5
   1.96 
  0.681


3 


What should be the Sample size that enable us to detect a true mean yield of 92
with power of 0.95?
  True  O  92  90  2
  1  0.95  0.05
Z   1.64


N  Z  / 2  Z  


2
2


 3 

(
1
.
96

1
.
64
)
*

   29.16  30


 2 

Tests on The VARIANCE
Statement of Test
H O :  2   O2
H 1 :  2   O2
or
 2   O2
or
 2   O2
Example 1
Consider the life data of the tires in the previous example. Can you conclude ,using α = 0.05, that the
standard deviation of the tire life exceeds 2500 km.? Find the P-Value of the test.
_______________________________________________________________________________________
Step 1
Statement of Test
H O :  2  6250000
H 1 :  2  6250000
Step 2
Process Data from experiments
60613 59836 59154 60252 59784 60221 60311 50040 60545
60257 60000 59997 69947 60135 60221 60523
S 2  13334101
N  16
‫المعيار األحصائى لألختبار‬
Step 3: Build A Relevant TEST STATISTIC by means of which we can Test Hypothesis Ho

N  1S 2
 
2
2
O
o

15 *13334101
 32
6250000
Step 4: Define The Zone of ACCEPTANCE
H 1 :  2  6250000
  0.05
  N  1  15
 2 ,   02.05,15  24.996
REJECT
α
1-α
ACCEPT
 2 ,
2
Step 5: Perform the hypothesis test by Comparing  O with
Since,
 2 ,
 O2  32  2,  24.996 then we are in the REJECT zone,
then we REJECT Ho.
Step 6: CONCLUSION
Since we Reject Ho, H1 (σ2> 6 250 000) is ACCEPTED, then
THERE IS ENOUGH EVIDENCE TO STATE THAT
THE TIRE LIFE STANDARD DEVIATION
IS GREATER THAN 2500 km
What is the P-Value of the test in the above example
P-VALUE
P Value  0.00643  0.01
Then, we Reject Ho absolutely
 O2  32
_____________________________________________________________________
If it is , by some means, known that the true standard deviation of the life time of the tires
Is 4000 km. What is the power of the experiment with sample size 16 to DETECT
that difference between the hypothetical and the true.
N=16
 O2 
N  1S
 o2
2
2
 True

N  1S
2
 True
N=24
2
, then
 o2
 2500  2
2
 2  O2  
  O  0.391 O
 True
 4000 
β
2

2
True
1-β
0.391 *  O2  32 * 0.391  12.5
Power of Test (with sample size =16)= 1 – β = 0.64
Increasing the sample size to 24 the Power of test will be:
1 – β = 0.962
CONFIDENCE INTERVAL ON THE VARIANCE

P  12 / 2, N 1  
2

  2 / 2, N 1  1  
 2


N  1S 2
2
P  1 / 2, N 1 
   / 2, N 1   1  
2



2


1

1

  1
P 2

 2
2

  / 2, N 1 
 1 / 2, N 1  N  1S
2
  N  1S 2


N

1
S
2
P 2
  2
 
 1 / 2, N 1
  / 2, N 1
α/2
α/2
1- α
 12 / 2, N 1

  1



N  1S 2
UL 
 12 / 2, N 1

N  1S 2
LL 
 2 / 2, N 1
 2 / 2, N 1
Tests on
The PROPORTIONS
Example 1
The Fraction of Defective Integrated Circuits produced in a process is studied.
A Random Sample of 50 circuits is tested, revealing 3 defectives. Is that result
Support the claim that the Proportion of defective circuits in the said process does Not
Exceed 1% (proportion of non defective circuits exceeds 99%.)
______________________________________________________________________
Here, the Number of Defective Circuits in a Sample of 50 Circuits is a Random
Variable distributed according to BINOMIAL distribution.
Step 1
Statement of test
Step 2
Experimental Data
Step 3
Test Statistic
Ho : p = 0.01
H1 : p > 0.01
Number of Defectives
Sample size
X=3
N = 50
Since X is a Binomial Variable, we use the Binomial Distribution
P  Value  P ( X  3 | 50)
P  Value  1 
2
C
X 0
50
X
p X 1  p 
Put p  0.01, we find :
RULE of DECISION by use of P-Value
Step 4
If P-Value ≤ 0.01
REJECT Ho absolutely
If P-Value ≥ 0.1
ACCEPT Ho absolutely
Otherwise it is up to concerned parties
50 X
P  Value  0.014
Step 5: Perform the hypothesis test by applying the rule of P-Value
P-Value = 0.014 which is near to 0.01, then we REJECT Ho
Hence ACCEPT H1 : p > 0.01
Step 6: Conclusion
Since we Reject Ho, [ H1 : p > 0.01 ] is ACCEPTED, then
THERE IS ENOUGH EVIDENCE TO STATE THAT the PROPORTION of Defective
Circuits is MORE THAN 0.01.
__________________________________________________________________________________________________________
What are the Upper and Lower Limits of Defective Proportions
that render the Test INSIGNIFICANT (Accept Ho and thus Reject H1)?
Ho : p  pU
H 1 : p  pU
P  Value  P  X  3 | 50  
2
C
X 0
pU  0.102
50
X
pUX 1  pU
50 X
 0.1
Ho : p  p L
H1 : p  p L
P  Value  P  X  3 | 50   1 
0.04  p  0.102
3
C
X 0
3
C
X 0
50
X
p LX 1  p L 
50 X
 0.9
50
X
p LX 1  p L 
50 X
p L  0.04
 0.1
Related documents