# 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 =

σ

n

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?

when n>200 you can approximate t using z values.228 t .048 t . If the sample size is large.025.df 10 = 2.df 100 = 1984 . Example: t . n>=30.025. X −µ If the sample size is small.025. X X −µ s n X is has a t distribution is approximately normally .025. As the degrees of freedom increase the student t looks more like the normal distribution. t .The degrees of freedom. s has a t distribution if n the underlying population is normally distributed so that normally distributed. because CLT applies and distributed.df 28 = 2.df∞ = 196 . n<30.

x + zα σ 2 n ) 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.f. t test 1. ant the number of unoccupied seats is noted for each of the sampled flights. b. Estimate µ. The population standard deviation is known as 5 seats.6. The population standard deviation is unknown and the sample standard deviation is known as 5 seats.=n-1 Recall: Confidence interval for z-test = ( x − zα σ 2 n . the mean number of unoccupied seats per flight during the past year using a 95% confidence interval. . a. x + tα 2 ) n n where d. The sample mean is 11. the records of 16 flights are randomly selected. t test: confidence interval Confidence interval for t-test = ( x − tα 2 s s . To accomplish this.II.

t test α=0. t test: hypothesis testing Example: According to a manufacturer.000 − 25.000 H1 : µ > 25.11.66) n 16 16 2. x + zα 2 σ n ) = (11.000 and a standard deviation of 5.025 = 1.05.6 − 2.66.a.025.000 t= X − µ 28.000. df =15 = 2.131 Confidence interval: ( x − tα 2 s .6 + 2.96 ) = (11.45) 16 16 b.11.01 H 0 : µ = 25.624 .000 t . Let α=. α/2=0.025.6 − 2.32 s 5. A random sample of 15 tires gives a mean of 28. 14 n = 2. average life of tire is greater than 25.11.6 − 2. df = n −1 = t0.6 + 2. Can we conclude from these data that the manufacturer’s product is as good as claimed. z test α=0.96 Confidence interval: ( x − zα 2 σ n .131 ) = (11.6 + 1.11.624 15 Cannot Reject H 0 since t = 2.025. zα 2 = z0. α/2=0.45.000 = = 2.32 < 2.6 − 1. Lives of tires are normally distributed.01.131 .96 5 5 . tα 2. x + tα n 2 s 5 5 ) = (11.000 miles.6 + 2.05.

2 . Case 1. 1 2 1 2 1 1 2 1 1. σ and σ are known. Case 2. σ and σ are known. INFERENCE ABOUT TWO POPULATIONS I. 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.PART II. Confidence interval and test statistic Case 1. • The interval estimator of µ 1 − µ 2 : 1 ( X1 − X 2 ) ± Zα 2 2 σ 12 n1 + • test statistic (z-test) Z= ( X 1 − X 2 ) − ( µ1 − µ2 ) σ 12 n1 + σ 22 n2 σ 22 n2 2. if the populations are nonnormal and the sample size are large. σ and σ are unknown and σ = σ Case 3. 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. σ and σ are unknown and σ ≠ σ .

Case 3. σ and σ are unknown and σ = σ . f.= n 1 + n2 − 2 S p2 ( n1 − 1) s12 + ( n2 − 1) s22 = n 1 + n2 − 2 3.Case 2. 2. f . 1 2 1 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.= s12 s22 + n1 n2 ⎛ s1 ⎜ ⎝ n1 ⎛⎛ 2⎞2 ⎜ ⎜ s1 ⎟ ⎜⎜n ⎟ ⎝ 1⎠ ⎜ ⎜ n1 − 1 ⎜ ⎜ ⎝ s ⎞ + 2⎟ n2 ⎠ + 2 2 ⎞ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎟ n2 − 1 ⎟ ⎟ ⎟ ⎠ ⎛ s2 ⎜ 2 ⎜n ⎝ 2 2 2 . • The interval estimator of µ − µ : 1 2 1 1 s12 s22 + n1 n2 ( X1 − X 2 ) ± t α 2 • test statistic (t-test) t= (X 1 − X 2 ) − ( µ 1 − µ 2 ) d. σ and σ are unknown and σ ≠ σ .

Twenty-five randomly selected workers each assembled the chair using Method A and 25 workers each assembled the chair using method B. PART III. 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. To help decide which should be used. However. p(1 − p) provided n . a mean of 6. a mean of 6. machines. The plant manager would like to know whether the assembly times of the two methods differ. an experiment was performed. 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. A 5% significance level is judged to be appropriate. and workforce have already been decided.142. two methods of assembly are under consideration. The Methods differ by the order in which the separate operations are performed.288 and a standard deviation of .921. The assembly times and minutes using method A.016 and a standard deviation of 1. The assembly times and minutes using method B. 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.Example: case 3 σ1 and σ2 are unknown and σ1 ≠ σ2. The material.

Test statistic for p z= p − p p(1 − p) n which is approximately normall for np and n(1-p) greater than 5.05 . a market survey was conducted of a sample for 400 Toronto readers. a newspaper publisher launched a new “national” newspaper in Canada. After providing a brief description of the proposed newspaper. If 58 participants said that they would subscribe. can the publisher conclude that the proposed newspaper will be financially viable? Let α=. Example: In the fall of 1998. one question asked if the survey participants would subscribe to the newspaper if the cost did not exceed \$20 per month. During the planning stages of this news newspaper. It was believed that the new newspaper would have to capture at least 12% of the Toronto market in order to be financially viable.

d.H 0 : p =. p(1 − p) .12 z= = = 154 . a. The average TOEFL score for international students is well above 575. . ) =. formulate appropriate null and alternative hypotheses and indicate whether the appropriate test will be one-tail or two-tail. The average American adult drinks less than 3 cups of coffee per day c. EXCEL EXAMPLES HYPOTHESIS TESTING Formulate hypotheses For each of the following statements.The average housewife works more than 40 hours per week in house related activities.12 p − p .12) n 400 p − value = P( Z > 154 . The average employee calls in sick 3 times a year.12(1−. b.0618 Rejection Region starts at 1. Cannot reject the null hypothesis.145−.645.12 H1: p >.

975 NORMSINV(0. a.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. What is your conclusion? c.2)=0. Calculate the value of the test statistic and set up the rejection region.025 TDIST(1.1)=0.1000. Does the p-value confirm the conclusion in part b? Computer examples Standard normal distribution NORMSDIST(z) = Pr(Z < z) NORMSDIST(1. State the appropriate null and alternative hypotheses b. 1000) = 1.96) = 0.1000.tails) gives us p-value TDIST(1.975) = 1.96 t-distribution TDIST(t. df) TINV(0.96 .df.05 TINV(alpha. Assume that the population standard deviation is 125 and a random sample of 25 scores had an average of 1375.05.96.Calculate the p-value d.96.

46) = 0.xls in your computer. Move your cursor to B1. Recall p-value p − value = P( X > 178) = P ( = P(Z > X −µ σ n > 178 − µ σ ) n 178 − 170 ) = P ( Z > 2. σ)’ . 65 400 3. Population standard deviation: σ = 65 Sample size: n = 400 X = 178 α=0.z-test using MS Excel 1. The variable name is Accountants.170.65)’and press Enter key. You will have the p-value of 0. The sample size of data8.0069.05 • H0: µ = 170.0069. type ‘=ZTEST(A1:A401. µ. Go to the class web site and save data8. Note that ‘ZTEST(data. • H1: µ > 170 (one-tail test) 2.xls is 400.

p-value is 0.05. Interpret the p-value.05).0069) is smaller than the significance level (0. the null hypothesis is not rejected.0069 and compare the p-value with α=0. If the p-value is greater than or equal to α. the null hypothesis rejected. If the p-value is smaller than α. Reject the null hypothesis with the 5% significance level because the pvalue (0.4. .