Chapter 8: Testing Statistical Hypothesis .

Post on 19-Dec-2015

224 views 2 download

Transcript of Chapter 8: Testing Statistical Hypothesis .

Chapter 8: Testing Statistical Hypothesis

http://www.rmower.com/statistics/Stat_HW/0801HW_sol.htm

Hypothesis: Examples

1. Parameter: π = proportion of cats that are long haired.Hypothesis: π < 0.40 (40%)

2. Parameter(s): μ1 = true average caloric intake of teens who

don’t eat fast food.μ2 = true average caloric intake of teens who do

eat fast food.Hypothesis: μ1 – μ2 < -200 (calories)

Math Hypotheses: Examples (1)Translate each of the following research questions into

appropriate hypothesis.1. The census bureau data show that the mean household

income in the area served by a shopping mall is $62,500 per year. A market research firm questions shoppers at the mall to find out whether the mean household income of mall shoppers is higher than that of the general population.

2. Last year, your company’s service technicians took an average of 2.6 hours to respond to trouble calls from business customers who had purchased service contracts. Do this year’s data show a different average response time?

Math Hypotheses: Examples (2)Translate each of the following research questions

into appropriate hypothesis.3. The drying time of paint under a specified test

conditions is known to be normally distributed with mean value 75 min and standard deviation 9 min. Chemists have proposed a new additive designed to decrease average drying time. It is believed that the new drying time will still be normally distributed with the same σ = 9 min. Should the company change to the new additive?

Hypothesis testing: example

Suppose we are interested in how many credit cards that people own. Let’s obtain a SRS of 100 people who own credit cards. In this sample, the sample mean is 4 and the sample standard deviation is 2. If someone claims that he thinks that μ = 2, is that person correct?

a) Construct a 95% CI for μ.b) To a hypothesis test.

Procedure for Hypothesis Testing1. Identify the parameter(s) of interest and

describe it in the context of the problem situation.

2. State the Hypotheses.3. Determine an appropriate α level.4. Calculate the appropriate test statistic.5. Find the P-value.6. Reject H0 or fail to reject H0 and why.

7. State the conclusion in the problem context.The data does [not] give strong support (P-value = [x]) to the claim that the [statement of Ha].

Hypothesis Testing: Example

In a random sample of 100 light bulbs, 7 are found defective. Is this compatible with the manufacturer’s claim of only 5% of the light bulbs produced are defective? Use an α = 0.01.

P-values for t tests

Table VI

Table VI (cont)

Single mean test: Example 1

A group of 15 male executives in the age group 35 – 44 have a mean systolic blood pressure of 126.07 and standard deviation of 15. Is this career group’s mean pressure different from that of the general population of males in this age group which have a mean systolic blood pressure of 128?

Single mean test: Example 2

A new billing system will be cost effective only if the mean monthly account is more than $170. Accounts have a standard deviation of $65. A survey of 41 monthly accounts gave a mean of $187. Will the new system be cost effective?

What would the conclusion be if the monthly accounts gave a mean of $160?

Single mean test: Summary

Null hypothesis: H0: μ = μ0

Test statistic: 0x

ts / n

Alternative HypothesisOne-sided: upper-tailed Ha: μ > μ0

One-sided: lower-tailed Ha: μ < μ0

two-sided Ha: μ ≠ μ0

Difference between two means test (independent): Summary

Null hypothesis: H0: μ1 – μ2 = Δ

Test statistic:

Note: If we are determining if the two populations are equal, then Δ = 0

1 2

2 21 2

1 2

x xt

s sn n

Alternative HypothesisOne-sided: upper-tailed Ha: μ1 – μ2 > ΔOne-sided: lower-tailed Ha: μ1 – μ2 < Δtwo-sided Ha: μ1 – μ2 ≠ Δ

Two-sample t-test

round DOWN to the nearest integer

22 21 2 22 2

1 21 22 2 4 42 2

1 21 1 2 2

1 21 2

s s(se ) (se )n n

dfse ses n s n

n 1 n 1n 1 n 1

11

1

sse

n 2

22

sse

n

Difference between two means test (independent): Example

A group of 15 college seniors are selected to participate in a manual dexterity skill test against a group of 20 industrial workers. Skills are assessed by scores obtained on a test taken by both groups. The data is shown in the following table:

Conduct a hypothesis test to determine whether the industrial workers had better manual dexterity skills than the students at the 0.05 significance level.

Compare with the 95% CI previously calculated.Group n sStudents 15 35.12 4.31Workers 20 37.32 3.83

x

Difference between two means test (paired): Summary

Null hypothesis: H0: μD = Δ

Test statistic:

d

dt

s / n

Alternative HypothesisOne-sided: upper-tailed Ha: μD > ΔOne-sided: lower-tailed Ha: μD < Δtwo-sided Ha: μD ≠ Δ

Difference between two means test (paired): Example

In an effort to determine whether sensitivity training for nurses would improve the quality of nursing provided at an area hospital, the following study was conducted. Eight different nurses were selected and their nursing skills were given a score from 1 to 10. After this initial screening, a training program was administered, and then the same nurses were rated again. Below is a table of their pre- and post-training scores.

Individual Pre-Training Post-Training Pre - Post

1 2.56 4.54 -1.982 3.22 5.33 -2.113 3.45 4.32 -0.874 5.55 7.45 -1.905 5.63 7.00 -1.376 7.89 9.80 -1.917 7.66 7.33 0.338 6.20 6.80 -0.60mean 5.27 6.57 -1.30stdev 2.018 1.803 0.861

Example: Paired t-testa) Conduct a test to determine whether the

training could on average improve the quality of nursing provided in the population.

b) Compare with the 95% CI previously calculated.

2 distribution

http://cnx.org/content/m13129/latest/chi_sq.gif

Critical value for 2 Distribution

2 critical values

2 critical values

2 distribution: ExampleIn the sweet pea, the allele for purple flower color (P) is

dominant to the allele for red flowers (p), and the allele for long pollen grains (L) is dominant to the allele for round pollen grains (l).

The first group (of grandparents) will be homozygous for the dominant alleles (PPLL) and the second group (of grandparents) will be homozygous for the recessive alleles (ppll)

Are these 25.5 cM apart? πPL(1) = 0.66, πPl(2) = 0.09, πpL(3) = 0.09, πpl(4) = 0.16

Observations: 381 F2 offspring284 purple/long, 21 purple/round, 21 red/long, 55 red/round

Homogeneity: Example

A certain population of people can be classified by their hair color and eye color. For this population, the possible choices for hair color are Brown, Black, Fair and Red and the possible choices of eye color are brown, grey/green and blue.

Homogeneous Population: Example

Hair Color

eye color

Brown Grey/Green Blue

Brown 0.17 0.53 0.30

Black 0.17 0.53 0.30

Fair 0.17 0.53 0.30

Red 0.17 0.53 0.30

Non-homogeneous Population: Example

Hair Coloreye color

Brown Grey/Green Blue

Brown 0.17 0.53 0.30

Black 0.24 0.61 0.15Fair 0.04 0.33 0.63Red 0.14 0.46 0.40

Contingency Table: Example

Hair Color

eye color

Brown Grey/Green Blue Sample size

Brown 438 1387 807 2632Black 288 746 189 1223Fair 115 946 1768 2829Red 16 53 47 116# in

category 857 3132 2811 6800

Contingency Table (Expected): Example

Hair Color

eye color

Brown Grey/Green Blue Total

Brown 438 (331.7)1387

(1212.3) 807 (1088.0) 2632

Black 288 (154.1) 746 (563.3) 189 (505.6) 1223

Fair 115 (356.5) 946 (1303.0) 1768 (1169.5) 2829

Red 16 (14.6) 53(53.4) 47 (48.0) 116

Total 857 3132 2811 6800

Homogeneity: Example

A certain population of people can be classified by their hair color and eye color. For this population, the possible choices for hair color are Brown, Black, Fair and Red and the possible choices of eye color are brown, grey/green and blue.

Cary out a 2 test at level 0.01 to see if the eye color in this population is associated with the hair color.

Statistical vs. Practical Significance