24
Inference for a Mean when you have a “small” sample...

Inference for a Mean

  • Upload
    audra

  • View
    33

  • Download
    0

Embed Size (px)

DESCRIPTION

Inference for a Mean. when you have a “small” sample. As long as you have a “large” sample…. A confidence interval for a population mean is:. where the average, standard deviation, and n depend on the sample. Z * depends on the confidence level. As long as you have a “large” sample…. - PowerPoint PPT Presentation

Citation preview

Page 1: Inference for a Mean

Inference for a Mean

when you have a “small” sample...

Page 2: Inference for a Mean

As long as you have a “large” sample….

A confidence interval for a population mean is:

n

sZx *

where the average, standard deviation, and n depend on the sample. Z* depends on the confidence level.

Page 3: Inference for a Mean

As long as you have a “large” sample….

A test statistic for a population mean is:

where the average, standard deviation, and n depend on the sample. is the value specified in the null.

ns

xZ

/

Page 4: Inference for a Mean

Example

Random sample of 59 students spent an average of $273.20 on Spring 1998 textbooks. Sample standard deviation was $94.40.

09.2420.27359

4.9496.120.273

We can be 95% confident that the average amount spent by all students was between $249.11 and $297.29.

Page 5: Inference for a Mean

ExampleA sample of 59 students spent an average of $273.20 on textbooks with a standard deviation of $94.40. Do students spend less than $300 on average?

There is enough evidence, at 0.05 level, to conclude that, on average, students spend less than $300 on textbooks.

015.0)18.2(59/4.94

3002.273)300(

ZPZPXP

Page 6: Inference for a Mean

What happens if you can only take a “small” sample?

• Random sample of 15 students slept an average of 6.4 hours last night with standard deviation of 1 hour.

• What is the average amount all students slept last night?

• Is the average amount less than 7 hours?

Page 7: Inference for a Mean

If you have a “small” sample...Replace the Z multiplier with a t multiplier to get:

n

stx *

where “t*” comes from Student t distribution, and depends on the sample size through the degrees of freedom “n-1”.

Page 8: Inference for a Mean

If you have a “small” sample...

Replace the Z statistic with the t statistic:

Again, “t” follows the Student’s t distribution, which depends on the sample size through the degrees of freedom “n-1”.

ns

xt

/

Page 9: Inference for a Mean

Student’s t distribution versus Normal Z distribution

-5 0 5

0.0

0.1

0.2

0.3

0.4

Value

dens

ity

T-distribution and Standard Normal Z distribution

T with 5 d.f.

Z distribution

Page 10: Inference for a Mean

Student t distribution

• Shaped like standard normal distribution (symmetric around 0, bell-shaped).

• But, t depends on the degrees of freedom “n-1”.

• And, more likely to get extreme t values than extreme Z values.

Page 11: Inference for a Mean

Graphical Comparison of t and Z Multipliers

0.90 0.92 0.94 0.96 0.98 1.00

0

1

2

3

4

5

Cumulative Probability

Z o

r T

Mul

tiplie

r T with 5 df

Z distribution

Page 12: Inference for a Mean

Tabular Comparison of t and Z Multipliers

Confidencelevel

t value with5 d.f

Z value

90% 2.015 1.65

95% 2.571 1.96

99% 4.032 2.58

For small samples, t value is larger than Z value.

So, t interval is longer than a Z interval, and for a given test statistic the P-value is larger.

Page 13: Inference for a Mean

Back to our CI example!

Sample of 15 students slept an average of 6.4 hours last night with standard deviation of 1 hour.

55.04.615

1145.24.6

n

stx

Need t with n-1 = 15-1 = 14 d.f. For 95% confidence, t14 = 2.145

Page 14: Inference for a Mean

That is...

We can be 95% confident that average amount slept last night by all students is between 5.85 and 6.95 hours.

Hmmm! Adults need 8 hours of sleep each night.

Logical conclusion:On average, students need more sleep.

(Just don’t get it in this class!)

Page 15: Inference for a Mean

T-Interval for Mean in Minitab

T Confidence Intervals

Variable N Mean StDev SE Mean 95.0 % CIComb 89 2.011 1.563 0.166 (1.682, 2.340)

We can be 95% confident that the average number of times a “Stat-250-like” student combs his or her hair is between 1.7 and 2.3 times a day.

Page 16: Inference for a Mean

T- interval in Minitab

• Select Stat.

• Select Basic Statistics.

• Select 1-Sample t…

• Select desired variable.

• Specify desired confidence level.

• Say OK.

Page 17: Inference for a Mean

And to our HT example!

New sample of 18 students slept an average of 6.01 hrs last night with standard deviation of 1.11 hrs. Do students sleep less than 7 hours on average?

H0: = 7 vs. HA: < 7

If the population mean is 7, how likely is it that a sample of 18 students would sleep an average as low as 6.01 hours?

Or, how likely is it that we’d get a t statistic as low as -3.78?

78.318/11.1

701.6

t

Page 18: Inference for a Mean

T-test for Mean in MinitabT-Test of the MeanTest of mu = 7.000 vs mu < 7.000

Variable N Mean StDev SE Mean T PSleepHrs 18 6.011 1.113 0.262 -3.77 0.0008

If the population mean was 7, it is not likely (P-value = 0.0008) that we’d get a sample mean as small as 6.011

Reject the null hypothesis. There is enough evidence to conclude that students sleep on average less than 7 hours.

Page 19: Inference for a Mean

T- test in Minitab

• Select Stat.

• Select Basic Statistics.

• Select 1-Sample t…

• Select desired variable.

• Specify the null mean in “Test mean” box.

• Select the alternative hypothesis.

• Say OK.

Page 20: Inference for a Mean

What happens as sample gets larger?

-5 0 5

0.0

0.1

0.2

0.3

0.4

Value

dens

ity

T-distribution and Standard Normal Z distribution

Z distribution

T with 60 d.f.

Page 21: Inference for a Mean

Example

Random sample of 64 students spent an average of 3.8 hours on homework last night with a sample standard deviation of 3.1 hours.

Z Confidence Intervals The assumed sigma = 3.10

Variable N Mean StDev 95.0 % CIHomework 64 3.797 3.100 (3.037, 4.556)

T Confidence IntervalsVariable N Mean StDev 95.0 % CIHomework 64 3.797 3.100 (3.022, 4.571)

Page 22: Inference for a Mean

ExampleRandom sample of 139 students own an average of 12.7 pairs of shoes with a sample standard deviation of 9.6 pairs.

Z-TestTest of mu = 10.000 vs mu > 10.000The assumed sigma = 9.63

Variable N Mean StDev SE Mean Z PShoes 139 12.669 9.625 0.816 3.27 0.0006

T-Test of the MeanTest of mu = 10.000 vs mu > 10.000

Variable N Mean StDev SE Mean T PShoes 139 12.669 9.625 0.816 3.27 0.0007

Page 23: Inference for a Mean

One not-so-small problem!

• It is only OK to use the t interval for small samples if your original measurements are normally distributed.

Page 24: Inference for a Mean

Strategy

• If you have a large sample of, say, 30 or more measurements, then don’t worry about normality, and use a t-interval or do a t-test.

• If you have a small sample and your data are normally distributed, then use a t-interval or do a t-test.

• If you have a small sample and your data are not normally distributed, then use nonparametric hypothesis tests.