Vous êtes sur la page 1sur 13

Hypothesis Test (2 hour)

7.0 Definitions
7.1 Type I and Type II errors
7.2 Hypothesis Test for Single Mean [Procedures for Hypothesis Testing]
7.3 Hypothesis Test for Difference Between Two Mean

7.0 DEFINITIONS

Hypothesis Test:
It is a process of using sample data and statistical procedures to decide whether to reject or not to
reject a hypothesis (statement) about a population parameter value (or about its distribution
characteristics).

Null Hypothesis,  :
This is a statement in which a population parameter has a specific value. The null
hypothesis is so named because it is the starting point for the investigation. The null
hypothesis is initially assumed to be true.
Therefore, it is the hypothesis to be tested.
Usually it takes the form of a statement about population parameter containing an equal
sign, = .

Alternative Hypothesis,  :
It is a statement about the same population parameter that is used in the null hypothesis
and generally this is a statement that specifies the population parameter has a value
different in some way, from the value given in the null hypothesis. The rejection of the
null hypothesis will imply the acceptance of this alternative hypothesis.
Usually it contains the mathematical symbols >, < or .

Example A
State the null and alternative hypothesis for each claim given below
(a) The average hourly wage of construction workers in the state of California is different from
$14, which is the national average.
(b) A milling process currently produces an average of 3% defectives. You are interested in
showing that a simple adjustment on a machine will decrease the defectives.
(c) The average weekly earnings for women in managerial and professional positions is RM
2010. Do men in the same positions have average weekly earnings that are higher for
women?

Solution:
(a)
: = 14
 : 14

(b)
: = 0.03
 : < 0.03

(c)
: = 2010
 : > 2010

1 Nurhana.PPD (2_14/15)
7.1 TYPE I AND TYPE II ERRORS

Test statistic:
It is a function of the sample data on which the decision is to be based.
Critical region:
It is a set of values of the test statistics for which the null hypothesis will be rejected.
Critical value (point):
It is the first (or boundary) value in the critical region.

Whenever statistical inference methods are employed, it is always possible that the decision
reached will be incorrect. This is because partial information obtained from the sample is used to
draw conclusions about the entire population.

Type I and Type II Errors


There are two types of errors, namely Type I and Type II errors that may have to be considered
when performing the hypothesis testing.

is
Decisions True False
Do not reject  Correct decision Type II error
Reject  Type I error Correct decision

Type I error : Rejecting


when it is in fact true.
ie;  (level of significance) is the probability of making a Type I error.
 = type I error = reject " | " true

Type II error : Accepting


when it is in fact false.
The probability of making such errors may be labeled as follows:
ie; % is the probability of making a Type II error.
% = type II error = accept " | " false

For Instance: A Jury Trial


In a jury trial, there are 4 possible outcomes.
The defendant is either guilty or innocent and he or she will be convicted or acquitted.

Hypothesis

: Defendant is innocent
 : Defendant is not innocent (guilty)
2 Nurhana.PPD (2_14/15)

is
Decisions True ( Innocent) False (Guilty)
Do not reject  (Acquit) Correct decision Type II error
Reject  (Convict) Type I error, alpha Correct decision

If the defendant is convicted but he did not commit the crime, then Type I error has been
committed. * +
If the defendant is acquitted but he did commit the crime, then Type II error has been
committed. *%+

7.2 HYPOTHESIS TEST FOR SINGLE MEAN


Testing the hypothesis about single population mean
Case 1: Variance, , - known, for any value of sample sizes.
  Statistical Test Rejection Region
=
a) <
a) . < 56
/0
b) >
.= b) . > 56
,/34
c)
c) . > 56/- or . < 56/-

Case 2: Variance, , - unknown and sample size 4 30.


  Statistical Test Rejection Region
=
a) <
a) . < 56
/0
b) >
.= b) . > 56
8/34
c)
c) . > 56/- or . < 56/-

Case 3: Variance, , - unknown and sample size 9 < :.


  Statistical Test Rejection Region
=
a) <
a) ; < <6,=
/0
b) >
;= b) ; > <6,=
8/34
c)
c) ; > <>,= or ; < <>,=
? ?

3 Nurhana.PPD (2_14/15)
The Tail Test
The tail of the bell shape will showed the rejection region

Statistical Test @ test A test


Tail

One tail
(Less than)

One tail
(Greater than)

Two tailed
(Not equal to)

** The Procedures for Hypothesis Testing **


Write down all the information and determine the level of significance

Step 1 : Define the question to be tested and formulate a hypothesis

Determine the case

Step 2: Compute statistical test

Step 3 : Determine the rejection region

Step 4: Make the decision whether reject or not to reject the null hypothesis

Step 5: Summarize the results.

4 Nurhana.PPD (2_14/15)
Example B
A teacher claims that students in Class A put in more hours studying compared to other students.
The mean numbers of hours spent studying per week is 25 hours with a standard deviation of 3
hours per week. A sample of 27 Class A students was selected at random and the mean number
of hours spent studying per week was found to be 26 hours.
Can the teachers claim be accepted at 5% significance level?

Solution:
Write down all the information
= 25 5% significance level
,=3
4 = 27  = 0.05
/D = 26

Step 1: Build the hypothesis



: = 25
 : > 25 Claim

CASE 1(b)

Step 2: @ test
/0
.= ,
34
26 25
=
3
327
= 1.7321

Step 3: Rejection Region


56 = 5
.
H = 1.6449

Step 4:
Test value fall in rejection region, so reject
.

Step 5:
There is enough evidence to support the claim that students in Class A put in more hours
studying compared to other students at 5% significance level.

5 Nurhana.PPD (2_14/15)
Example C
From extensive records, it is known that the duration of treating a disease by a standard therapy
has a mean of 15 days with a standard deviation of 3 days. It is claimed that a new therapy can
reduce the treatment time. To test this claim, the new therapy is tried on 70 patients, and their
average treatment time is calculated to be 14.6 days. Test the claim at 1% significance level.

Solution:
Write down all the information
= 15 1% significance level
,=3
4 = 70  = 0.01
/0 = 14.6

Build the hypothesis



: = 15
 : < 15 Claim

Case 1(a)
@ test
/0
.= ,
34
14.6 15
=
3
370
= 1.1155

Rejection Region
5
.
 = 2.3263

Test value did not fall in rejection region, so do not reject


. Means that; ACCEPT 

There is no evidence to support claim that a new therapy can reduce the treatment time at 1%
significance level.

6 Nurhana.PPD (2_14/15)
Example D
It is claimed that a new treatment is more effective than the standard treatment for prolonging the
lives of terminal cancer patients. The standard treatment has been in use for a long time, and
from records in medical journals the mean survival period has been 4.2 years with a standard
deviation of 1.1 years. The new treatment is administered to 80 patients, and their average
duration of survival is calculated to be 4.5 years. Test the claim at 1% significance level.

Solution:
Write down all the information
= 4.2 1% significance level
, = 1.1
4 = J0  = 0.01
/D = 4.5

Build the hypothesis



: = 4.2
 : > 4.2 Claim

CASE 1 (b)

@ test
/0
.= ,
34
4.5 4.2
=
1.1
3J0
= 2.4393.

Rejection Region
56 = 5
.
 = 2.3263

Test value fall in rejection region, so reject


.

There is enough evidence to support the claim that a new treatment is more effective than the
standard treatment for prolonging the lives of terminal cancer patients at 1% significance level.

7 Nurhana.PPD (2_14/15)
Example E
The mean lifetime for a sample of 100 batteries is 1570 hours with standard deviation 120 hours.
However, the company claimed that their batteries average lifetime is 1600 hours. Test the claim
at 5% level of significance.

Solution:
Write down all the information
4 = 100 5% significance level
/0 = 1570  = 0.05
8 = 120
= 1600

Build the hypothesis



: = 1600 Claim
 : 1600

CASE 2(c)

@ test
/0
.= 8
34
1570 1600
=
120
3100
= 2.5

Rejection Region
K56 = K5
.
-H = K1.96
-

Test value fall in rejection region, so reject


.

There is not enough evidence to support the claim that their batteries average lifetime is 1600
hours at 5% significance level.

8 Nurhana.PPD (2_14/15)
Example F
Human IQ is normally distributed with a mean of 110 and variance of 144. An educationist
claims that university students have higher IQ than ordinary students. To prove his claim a
sample of 30 university students are chosen a random and their mean IQ scores is 114. Perform
the appropriate hypothesis test at 5% significance level to prove the educationist claim.

Solution:
Write down all the information
= 110 5% significance level
, - = 144
4 = 30  = 0.05
/D = 114

Step 1: Build the hypothesis



: = 110
 : > 110 Claim

CASE 1(b)

Step 2: @ test
/0
.= ,
34
114 110
=
12
330
= 1.J257

Step 3: Rejection Region


56 = 5
.
H = 1.6449

Step 4:
Test value fall in rejection region, so reject
.

Step 5:
There is enough evidence to support the claim that university students have higher IQ than
ordinary students at 5% significance level.

9 Nurhana.PPD (2_14/15)
7.3 HYPOTHESIS TEST FOR DIFFERENCE BETWEEN TWO MEANS

To test a claim about difference between two population means, we follow the procedure of
solving hypothesis testing problems in subtopic 7.2. The statistical test (Step 2) for difference
between 2 means is given as below:
The Hypothesis:
 :  - <
Reject
when . < 56 or ; < <6,=

:  - =
vs  :  - >
Reject
when . > 56 or ; > <6,=
 :  -
Reject
when . > 56/- or . < 56/- or
; > <>,= LM ; < <>,=
? ?

The Test Statistics:


Hypothesis test involving two population mean,  - can be categorized as follows:
Case 1:Variance, , - and ,- - known, for any value of sample sizes.

Z=
(X 1 )
X 2 ( 1 2 )
2 2
1
+ 2
n1 n2

Case 2 and 3: Variance, , - and ,- - unknown, then the following table shows the different
formulae that may be used depending on the sample sizes and the assumption on the population
variances.
Sample size Equality of variances
, - ,- - , - = ,- -
4 30, 4- 30 Case 2(a) Case 2(b)

Z=
(X 1 )
X 2 ( 1 2 )
Z=
(X 1 )
X 2 ( 1 2 )
2 2
s1 s 1 1
+ 2 sg +
n1 n2 n1 n2

sg =
(n1 1)s12 + (n2 1)s2 2
n1 + n2 2

4 < 30, 4- < 30 Case 3(a) Case 3(b)

T=
(X 1 )
X 2 ( 1 2 )
T=
(X 1 )
X 2 ( 1 2 )
2 2
s1 s 1 1
+ 2 sg +
n1 n2 n1 n2
2
s12 s2 2

n + n (n1 1)s12 + (n2 1)s2 2
v= 1 2
sg =
s12
2
s2 2
2
n1 + n2 2

n
1 + n2 v = n1 + n2 2
n1 1 n2 1

10 Nurhana.PPD (2_14/15)
Example G
The mean lifetime of 20 bulbs produced by Company A is 40 hours and the mean lifetime of 25
bulbs produced by Company B is 38 hours. If the standard deviation of all bulbs produced by
Company A is 2.5 hours and the standard deviation of all bulbs produced by Company B is 3
hours, test at 1% significance level to prove the claim that mean lifetime of bulbs produced by
Company A is better than that of Company B.

Solution:
Write down all the information
/0 = 40, /0- = 3J 1% significance level
4 = 20, 4- = 25
, = 2.5, ,- = 3  = 0.01

Build the hypothesis



:  - = 0
 :  > -
 :  - > 0 Claim

Determine case
CASE 1

Z=
(X1 )
X 2 (1 2 )
=
(40 38) (0) = 2.439
2 2
1 2 2.52 32
+ +
n1 n2 20 25

Rejection Region
56 = 5
.
 = 2.3263

Test value fall in rejection region, so reject


.

Conclusion
There is enough evidence to support the claim that mean lifetime of bulbs produced by Company
A is better than that of Company B at 1% significance level.

11 Nurhana.PPD (2_14/15)
Example H
A sample of 60 maids from country A earns an average of RM 300 per week with a standard
deviation of RM 16, while a sample of 60 maids from country B earns an average of RM 250 per
week with a standard deviation of RM 18. Test at 5% significance level that country A maids
average earning exceed country B maids average earning more than RM 40 per week. Assume
the two population variances are not equal

Solution:
Write down all the information
/0 = 300, /0- = 250 5% significance level
4 = 60, 4- = 60
8 = 16, 8- = 1J  = 0.05

Build the hypothesis



:  - = 40
 :  > - + 40
 :  - > 40 Claim

CASE 2(a)

Z=
(X1 )
X 2 (1 2 )
=
(300 250) 40 = 3.2
2 2
s1 s 2 16 2 182
+ +
n1 n 2 60 60

Rejection Region
56 = 5
.
H = 1.6449

Test value fall in rejection region, so reject


.

There is enough evidence to support the claim that country A maids average earning exceed
country B maids average earning more than RM 40 per week at 5% significance level.

12 Nurhana.PPD (2_14/15)
Example I
An experiment is done to test the strength of two types of glasses. A sample of 12 pieces of
glasses has a mean strength of 40 kg and a standard deviation of 2 kg. A sample of 13 pieces of
glasses has a mean strength of 38 kg and standard deviation of 2.5 kg. Test at 5% significance
level that the mean strength of the two types of glasses is the same. Assume the two population
variances are equal.

Solution:
Write down all the information
/0 = 40, /0- = 3J 5% significance level
4 = 12, 4- = 13
8 = 2, 8- = 2.5  = 0.05

Build the hypothesis



:  - = 0 Claim
 :  - 0

CASE 3(b)

T=
(X 1 )
X 2 (1 2 ) (40 38) 0
= = 2.172
1 1 1 1
sg + 2.3 +
n1 n 2 12 13

sg=
(n1 1)s12 + (n2 1)s2 2 =
11 2 2 + 12 2.5 2
= 2.3
n1 + n2 2 12 + 13 2

v = n1 + n2 2 = 12 + 13 2 = 23

Rejection Region
<6,= = <
.
-H,-O = 2.069
-

Test value fall in rejection region, so reject


.

There is not enough evidence to support the claim that the mean strength of the two types of
glasses is the same at 5% significance level.

13 Nurhana.PPD (2_14/15)

Vous aimerez peut-être aussi