20
Lecture 17 Section 8.2 Objectives: Tests concerning hypotheses about means One sample tests Two sided tests and Confidence Intervals Two sample tests (independent samples) Paired t-tests

Lecture 17 Section 8.2

Embed Size (px)

DESCRIPTION

Lecture 17 Section 8.2. Objectives: Tests concerning hypotheses about means One sample tests Two sided tests and Confidence Intervals Two sample tests (independent samples) Paired t-tests. Tests for a population mean. - PowerPoint PPT Presentation

Citation preview

Page 1: Lecture 17 Section 8.2

Lecture 17Section 8.2

Objectives:

•Tests concerning hypotheses about means− One sample tests− Two sided tests and Confidence Intervals− Two sample tests (independent samples)− Paired t-tests

Page 2: Lecture 17 Section 8.2

Tests for a population mean

µdefined by H0

x

Sampling distribution

z x n

σ/√n

To test the hypothesis H0 : µ = µ0 based on an SRS of size n from a

Normal population with unknown mean µ and known standard

deviation σ, we rely on the properties of the sampling distribution N(µ,

σ/√n).

The P-value is the area under the sampling distribution for values at

least as extreme, in the direction of Ha, as that of our random sample.

Again, we first calculate a z-value

and then use Table A.

Page 3: Lecture 17 Section 8.2

P-value in one-sided and two-sided tests

To calculate the P-value for a two-sided test, use the symmetry of the

normal curve. Find the P-value for a one-sided test and double it.

One-sided

(one-tailed) test

Two-sided

(two-tailed) test

Page 4: Lecture 17 Section 8.2

One sample t-test

Suppose that an SRS of size n is drawn from an N(µ, σ) population.

When is known, the sampling distribution of x bar is N(/√n).

When is estimated from the sample standard deviation s, the

sampling distribution follows a t distribution t(, s/√n) with degrees

of freedom n − 1.

is the one-sample t statistic.ns

xt

Page 5: Lecture 17 Section 8.2

ns

xt 0

One-sided (one-tailed)

Two-sided (two-tailed)

The P-value is the probability, if H0 is true, of randomly drawing a

sample like the one obtained or more extreme, in the direction of Ha.

The P-value is calculated as the corresponding area under the curve,

one-tailed or two-tailed depending on Ha:

Page 6: Lecture 17 Section 8.2

ExampleThe medical director of one large company is concerned about the effects of stress on the company’s younger executives. The mean systolic blood pressure for males 35 to 44 years of age (national average) is 128 and standard deviation is 15. They examine the records of 72 executives in this age group and finds that their mean systolic blood pressure is 129.93. Assume that the population distribution is normal. Is this evidence that the mean blood pressure for all the company’s young male executives is higher than the national average? Test this at α=0.05 significance level.

a. State hypotheses.

b. Compute test statistic and P-value.

c. Make a decision and state a conclusion in terms of the problem.

Page 7: Lecture 17 Section 8.2

Example

The recommended daily dietary (RDA) allowance for zinc among males older than 50 years is 15mg/day. The following data on zinc intake for a sample of males age 65-74 years:

n=115, sample mean=11.3, sample sd=6.43

Does this suggest that true average daily zinc intake for the entire population of males age 65-74 is less than the recommended allowance? Use α=0.05.

Page 8: Lecture 17 Section 8.2

Example

Consider the following data on the fill amounts in "16oz." ketchup bottles:

15.39, 15.62, 16.05, 15.90, 15.47, 15.83, 15.80, 15.65.

Assume that the population distribution of the fill amount is normal with unknown σ .

Test H0: μ = 15.5 vs. Ha: μ > 15.5 at the α = 0.01 significance level.

Page 9: Lecture 17 Section 8.2

Confidence intervals to test hypothesesBecause a two-sided test is symmetrical, you can also use a

confidence interval to test a two-sided hypothesis.

α /2 α /2

In a two-sided test,

C = 1 – α.

C confidence level

α significance level

Packs of cherry tomatoes (σ= 5 g): H0 : µ = 227 g versus Ha : µ ≠ 227 g

Sample average 222 g. 95% CI for µ = 222 ± 1.96*5/√4 = 222 g ± 4.9 g

227 g does not belong to the 95% CI (217.1 to 226.9 g). Thus, we reject H0.

Page 10: Lecture 17 Section 8.2

Ex: Your sample gives a 99% confidence interval of .

With 99% confidence, could samples be from populations with µ = 0.86? µ = 0.85?

x m 0.84 0.0101

99% C.I.

Logic of confidence interval test

x

Cannot rejectH0: = 0.85

Reject H0 : = 0.86

A confidence interval gives a black and white answer: Reject or don't reject H0.

But it also estimates a range of likely values for the true population mean µ.

A P-value quantifies how strong the evidence is against the H0. But if you reject

H0, it doesn’t provide any information about the true population mean µ.

Page 11: Lecture 17 Section 8.2

ExampleConsider the following weights of some runners are expressed inkilograms.

67.8 61.9 63.0 53.1 62.3 59.7 55.4 58.9 60.9 69.2 63.7 68.364.7 65.6 56.0 57.8 66.0 62.9 53.6 65.0 55.8 60.4 69.3 61.7

Assume that the population (weights of all runners) has normal distribution with mean μ (unknown) and the population standard deviation σ = 4.5 kg.

a. Give a 95% confidence interval for the mean weight of the population of all such runners.

b. Based on this confidence interval, does a test ofH0: μ = 61.3 kgHa: μ ≠ 61.3 kg

reject H0 at the 5% significance level?

Page 12: Lecture 17 Section 8.2

Comparing two samples

Which

is it? We often compare two

treatments used on

independent samples.

Is the difference between both

treatments due only to variations

from the random sampling (B),

or does it reflect a true

difference in population means

(A)?

Independent samples: Subjects in one samples are

completely unrelated to subjects in the other sample.

Population 1

Sample 1

Population 2

Sample 2

(A)

Population

Sample 2

Sample 1

(B)

Page 13: Lecture 17 Section 8.2

Two-sample z statistic

We have two independent SRSs (simple random samples) possibly

coming from two distinct populations with () and (). We use 1

and 2 to estimate the unknown and .

When both populations are normal, the sampling distribution of ( 1- 2)

is also normal, with standard deviation :

Then the two-sample z statistic

has the standard normal N(0, 1)

sampling distribution.

2

22

1

21

nn

2

22

1

21

2121 )()(

nn

xxz

x

x

x

x

Page 14: Lecture 17 Section 8.2

Two independent samples t distributionWe have two independent SRSs (simple random samples) possibly

coming from two distinct populations with () and () unknown.

We use ( 1,s1) and ( 2,s2) to estimate () and (), respectively.

To compare the means, both populations should be normally distributed.

However, in practice, it is enough that the two distributions have similar

shapes and that the sample data contain no strong outliers.

x

x

Page 15: Lecture 17 Section 8.2

t (x 1 x 2) (1 2)

SE

Two-sample t significance test

The null hypothesis is that both population means and are equal,

thus their difference is equal to zero.

H0: = −

with either a one-sided or a two-sided alternative hypothesis.

We find how many standard errors (SE) away

from ( − ) is ( 1− 2) by standardizing with t:

Because in a two-sample test H0

poses ( − 0, we simply use

t x 1 x 2s1

2

n1

s22

n2

x

x

df

s12

n1

s2

2

n2

2

1n1 1

s12

n1

2

1n2 1

s22

n2

2

Page 16: Lecture 17 Section 8.2

Example

Consider the lifetimes of two kinds of light bulbs:

Take a random sample of size n1=40 from the population with mean μ1 and standard deviation σ1=26,

Take independently another random sample of size n2=50 from the population with mean μ2 and standard deviation σ2=22.

Test : H0: μ1 −μ2 =0 vs. Ha: μ1 −μ2 ≠ 0 at α = .05 .

Page 17: Lecture 17 Section 8.2

Example

In the comparison of two kinds of paint, a consumer testing service finds that34 1-gallon cans of Benjamin Moore paint cover on the average 5480 square feet with a standard deviation of 62 feet, whereas 41 1-gallon cans of Pittsburgh paint cover on the average 5452 square feet with a standard deviation of 51 feet. Test to see whether or not the Pittsburgh paints cover a larger area on average, at the 1% significance level.

Page 18: Lecture 17 Section 8.2

Example

The following data on tensile strength (psi) of linear specimens both when a certain fusion process was used and when this process was not used:

1. No fusion: 2784 2700 2655 2822 2511 3149 3257 3213 3220 27532. Fused: 3027 3356 3359 3297 3125 2910 2889 2902

Test if the fusion process increased the average tensile strength at the 5% significance level.

Page 19: Lecture 17 Section 8.2

In these cases, we use the paired data to test the difference in the two

population means. The variable studied becomes Xdifference = (X1 − X2),

and

H0: µdifference= 0 ; Ha: µdifference>0 (or <0, or ≠0)

Conceptually, this is not different from tests on one population.

Paired t-test

Page 20: Lecture 17 Section 8.2

ExampleThe following data was obtained from a sample of n=16 subjects. Each observation is the amount of time, expressed as a proportion of total time observed, during which arm elevation was below 30o. The two measurements from each subject were obtained 18 months apart. During this period, work conditions were changed, and subjects were allowed to engage in a wider variety of work tasks

a. Does the data suggest that true average time during which elevation is below 30o differs after the change from what it was before the change?

b. Does it appear the change in work conditions decreases true average time by more than 5?