Anda di halaman 1dari 12

LECTURE NOTE 10

HYPOTHESIS TESTING 2

I. Test of a Mean: 2 unknown


1. z test vs. t test
If the population standard deviation () is known, use z test
X
where Z ~ N (0,1) .
as Z =

X
where t ~ t (n 1)
s
n
and s is the sample standard deviation. t has a student tdistribution and has degree of freedom (d.f.=n-1).
If is not known, use t test as t =

Recall the sample standard deviation.


Sample Variance:The variance of a sample of n measurements
n

x1, x2, ..., xn with mean ( x ) is S = (1/(n 1)) ( xi x) 2 . Sample


2

i =1

standard deviation S = S 2
2. t distribution: What does the t distribution look like?
a. Similar to the z distribution: Symmetric around zero, Mound
shaped, and Mean is zero.
b. The t distribution has wider tails
c. There is a different distribution for each degree of freedom
value.
d. What determines how much wider is the t-distribution than
the normal distribution?

The degrees of freedom. As the degrees of freedom increase


the student t looks more like the normal distribution.
Example:

t .025,df 10 = 2.228
t .025,df 28 = 2.048
t .025,df 100 = 1984
.
t .025,df = 196
.

when n>200 you can approximate t using z values.

X
If the sample size is small, n<30, s has a t distribution if
n

the underlying population is normally distributed so that


normally distributed.

If the sample size is large, n>=30,


because CLT applies and
distributed.

X
s
n

is

has a t distribution

is approximately normally

II. t test
1. t test: confidence interval
Confidence interval for t-test
=

( x t 2

s
s
, x + t 2
)
n
n where d.f.=n-1

Recall: Confidence interval for z-test


=

( x z

, x + z

Example:
Unoccupied seats on flights cause airlines to lose revenue.
Suppose a large airline wants to estimate its average number of
unoccupied seats per flight over the past year. To accomplish
this, the records of 16 flights are randomly selected, ant the
number of unoccupied seats is noted for each of the sampled
flights. The sample mean is 11.6. Estimate , the mean number
of unoccupied seats per flight during the past year using a 95%
confidence interval.
a. The population standard deviation is known as 5 seats.
b. The population standard deviation is unknown and the
sample standard deviation is known as 5 seats.

a. z test
=0.05. /2=0.025.

z 2 = z0.025 = 1.96

Confidence interval:
( x z 2

, x + z 2

) = (11.6 1.96

5
5
,11.6 + 1.96
) = (11.6 2.45,11.6 + 2.45)
16
16

b. t test
=0.05. /2=0.025.

2, df = n 1

= t0.025, df =15 = 2.131

Confidence interval:
( x t

s
, x + t
n

s
5
5
) = (11.6 2.131
,11.6 + 2.131
) = (11.6 2.66,11.6 + 2.66)
n
16
16

2. t test: hypothesis testing


Example:
According to a manufacturer, average life of tire is greater than
25,000 miles. A random sample of 15 tires gives a mean of
28,000 and a standard deviation of 5,000. Lives of tires are
normally distributed. Can we conclude from these data that the
manufacturers product is as good as claimed. Let =.01
H 0 : = 25,000
H1 : > 25,000
t=

X 28,000 25,000
=
= 2.32
s
5,000

t .01, 14

n
= 2.624

15

Cannot Reject H 0 since t = 2.32 < 2.624

PART II. INFERENCE ABOUT TWO POPULATIONS


I. The Sampling Distribution of Difference between Two Sample
Means: X 1 X 2
X 1 X 2 is normally distributed if the populations are
normal and approximately normal, if the populations are
nonnormal and the sample size are large.

E( X1 X 2 ) = E( X1) E( X 2 ) = 1 2
V ( X1 X 2 ) = V ( X1) + V ( X 2 ) =

12
n

22
n

II. Confidence interval and test statistic


Case 1. and are known.
Case 2. and are unknown and =
Case 3. and are unknown and .
1

1. Case 1. and are known.


The interval estimator of 1 2 :
1

( X1 X 2 ) Z
2

12
n1

test statistic (z-test)


Z=

( X 1 X 2 ) ( 1 2 )

12
n1

22
n2

22
n2

2.

Case 2. and are unknown and = .

2.

The interval estimator of 1 2 :


S 2p (

( X1 X 2 ) t
2

1
1
+ )
n1 n2

test statistic (t-test)


( X 1 X 2 ) (1 2 )
t=

S p2 (

1
1
+ )
n1 n2

d. f.= n 1 + n2 2
S p2

( n1 1) s12 + ( n2 1) s22
=
n 1 + n2 2

3. Case 3. and are unknown and .


The interval estimator of :
1

s12 s22
+
n1 n2

( X1 X 2 ) t
2

test statistic (t-test)


t=

(X 1 X 2 ) ( 1 2 )

d. f .=

s12 s22
+
n1 n2
s1

n1
22
s1
n
1

n1 1

s
+ 2
n2

n2 1

s2
2
n
2

Example: case 3 1 and 2 are unknown and 1 2.

The plant manger of a company that manufactures office equipment is


attempting to determine the process that will be used to assemble a new
ergonomic chair. The material, machines, and workforce have already been
decided. However, two methods of assembly are under consideration. The
Methods differ by the order in which the separate operations are performed.
To help decide which should be used, an experiment was performed.
Twenty-five randomly selected workers each assembled the chair using
Method A and 25 workers each assembled the chair using method B. The
assembly times and minutes using method A, a mean of 6.288 and a
standard deviation of .921. The assembly times and minutes using method B,
a mean of 6.016 and a standard deviation of 1.142. The plant manager
would like to know whether the assembly times of the two methods differ.
A 5% significance level is judged to be appropriate.

PART III.
Testing the Population Proportion
We use sample proportions to estimate the population
proportion

p =

x
n

x is the number of successes and n is the sample size.


We know that the sampling distribution of p is approximately
normal with mean p and standard deviation
that np and n(1-p) are greater than 5.

p(1 p)
provided
n

Test statistic for p

z=

p p
p(1 p)
n

which is approximately normall for np and n(1-p) greater than 5.

Example:
In the fall of 1998, a newspaper publisher launched a new
national newspaper in Canada. It was believed that the new
newspaper would have to capture at least 12% of the Toronto
market in order to be financially viable. During the planning
stages of this news newspaper, a market survey was conducted
of a sample for 400 Toronto readers. After providing a brief
description of the proposed newspaper, one question asked if
the survey participants would subscribe to the newspaper if the
cost did not exceed $20 per month. If 58 participants said that
they would subscribe, can the publisher conclude that the
proposed newspaper will be financially viable? Let =.05

H 0 : p =.12
H1: p >.12
p p
.145.12
z=
=
= 154
.
p(1 p)
.12(1.12)
n
400
p value = P( Z > 154
. ) =.0618
Rejection Region starts at 1.645. Cannot reject the null
hypothesis.

EXCEL EXAMPLES
HYPOTHESIS TESTING
Formulate hypotheses
For each of the following statements, formulate appropriate
null and alternative hypotheses and indicate whether the
appropriate test will be one-tail or two-tail.
a. The average TOEFL score for international students is
well above 575.
b. The average American adult drinks less than 3 cups of
coffee per day
c.The average housewife works more than 40 hours per
week in house related activities.
d. The average employee calls in sick 3 times a year.

z-test
The Admissions officer for the graduate programs at
Michigan State University (MSU) believes that the average
score on the GRE exam at his university is significantly
higher than the national average of 1300. Assume that the
population standard deviation is 125 and a random sample
of 25 scores had an average of 1375.
a. State the appropriate null and alternative hypotheses
b. Calculate the value of the test statistic and set up the
rejection region. What is your conclusion?
c.Calculate the p-value
d. Does the p-value confirm the conclusion in part b?

Computer examples
Standard normal distribution
NORMSDIST(z) = Pr(Z < z)
NORMSDIST(1.96) = 0.975
NORMSINV(0.975) = 1.96
t-distribution
TDIST(t,df,tails) gives us p-value
TDIST(1.96,1000,1)=0.025
TDIST(1.96,1000,2)=0.05
TINV(alpha, df)
TINV(0.05, 1000) = 1.96

z-test using MS Excel


1. Go to the class web site and save data8.xls in your
computer. The sample size of data8.xls is 400. The variable
name is Accountants.
Population standard deviation: = 65
Sample size: n = 400
X = 178

=0.05
H0: = 170.
H1: > 170 (one-tail test)

2.

Recall p-value

p value = P( X > 178) = P (


= P(Z >

>

178

178 170
) = P ( Z > 2.46) = 0.0069.
65
400

3. Move your cursor to B1, type


=ZTEST(A1:A401,170,65)and press Enter key. You will
have the p-value of 0.0069.
Note that ZTEST(data, , )

4. Interpret the p-value.


If the p-value is greater than or equal to , the null
hypothesis is not rejected.
If the p-value is smaller than , the null hypothesis rejected.
p-value is 0.0069 and compare the p-value with =0.05. Reject
the null hypothesis with the 5% significance level because the pvalue (0.0069) is smaller than the significance level (0.05).

Anda mungkin juga menyukai