Ch 12 實習

46
Ch 12 實實

description

Ch 12 實習. Introduction. We shall develop techniques to estimate and test three population parameters. Population mean m Population variance s 2 Population proportion p. Inference About a Population Mean When the Population Standard Deviation Is Unknown. - PowerPoint PPT Presentation

Transcript of Ch 12 實習

Page 1: Ch 12  實習

Ch 12 實習 Ch 12 實習

Page 2: Ch 12  實習

Jia-Ying Chen2

We shall develop techniques to estimate and test three population parameters. Population mean Population variance 2

Population proportion p

Introduction

Page 3: Ch 12  實習

Jia-Ying Chen3

Recall that when is known we use the following statistic to estimate and test a population mean

When is unknown, we use its point estimator s,

and the z-statistic is replaced then by the t-statistic

Inference About a Population Mean When the Population Standard Deviation

Is Unknown

n

xz

Page 4: Ch 12  實習

Jia-Ying Chen4

The t - Statistic

n

x

n

x

s

0

The t distribution is mound-shaped, and symmetrical around zero.

The “degrees of freedom”,(a function of the sample size)determine how spread thedistribution is (compared to the normal distribution)

d.f. = v2

d.f. = v1

v1 < v2

t

Page 5: Ch 12  實習

Jia-Ying Chen5

自由度

統計學上的自由度( degree of freedom, d

f ),是指當以樣本的統計量來估計總體的參數時, 樣本中獨立或能自由變化的資料的個數,稱為該統計量的自由度

Ex:

Page 6: Ch 12  實習

Jia-Ying Chen6

How to calculus sample variance

1

,,2

2

2

2

nn

xx

s

thusxx

havewedatatheFrom

ii

ii

Page 7: Ch 12  實習

Jia-Ying Chen7

Example 1 In order to determine the number of workers

required to meet demand, the productivity of newly hired trainees is studied.

It is believed that trainees can process and distribute more than 450 packages per hour within one week of hiring.

Can we conclude that this belief is correct, based on productivity observation of 50 trainees

Testing when is unknown

Page 8: Ch 12  實習

Jia-Ying Chen8

Example 1 – Solution The problem objective is to describe the

population of the number of packages processed in one hour.

The data are interval.

H0: = 450 H1: > 450

The t statistic

d.f. = n - 1 = 49ns

xt

Testing when is unknown

Page 9: Ch 12  實習

Jia-Ying Chen9

Solution continued (solving by hand) The rejection region is

t > t,n – 1

t,n - 1 = t.05,49

t.05,50 = 1.676.

83.3855.1507s

.55.15071n

nx

xs

and,38.46050019,23

x

thus,357,671,10x019,23x

havewedatatheFrom

2

i2i2

2ii

Testing when is unknown

Page 10: Ch 12  實習

Jia-Ying Chen10

The test statistic is

89.15083.38

45038.460

ns

xt

Since 1.89 > 1.676 we reject the null hypothesis in favor of the alternative.

There is sufficient evidence to infer that the mean productivity of trainees one week after being hired is greater than 450 packages at .05 significance level.

1.676 1.89

Rejection region

Testing when is unknown

Page 11: Ch 12  實習

Jia-Ying Chen11

Estimating when is unknown

Confidence interval estimator of when

is unknown

1n.f.dn

stx 2 1n.f.d

n

stx 2

Page 12: Ch 12  實習

Jia-Ying Chen12

Example 2 An investor is trying to estimate the return

on investment in companies that won quality awards last year.

A random sample of 83 such companies is selected, and the return on investment is calculated had he invested in them.

Construct a 95% confidence interval for the mean return.

Estimating when is unknown

Page 13: Ch 12  實習

Jia-Ying Chen13

Solution (solving by hand) The problem objective is to describe the

population of annual returns from buying shares of quality award-winners.

The data are interval. Solving by hand

From the data we determine

31.898.68

98.6802.15 2

s

sx

85.16,19.1383

31.8990.102.151,2

n

stx n

t.025,82 t.025,80

Estimating when is unknown

Page 14: Ch 12  實習

Jia-Ying Chen14

Checking the required conditions

We need to check that the population is normally distributed, or at least not extremely nonnormal.

There are statistical methods to test for normality

From the sample histograms we see…

Page 15: Ch 12  實習

Jia-Ying Chen15

0

5

10

15

20

25

30

-4 2 8 14 22 30 More

02468

101214

400 425 450 475 500 525 550 575 More

A Histogram for Example 1

PackagesA Histogram for Example 2

Returns

Page 16: Ch 12  實習

Jia-Ying Chen16

Summary of Test Statistics to be Summary of Test Statistics to be Used in aUsed in a

Hypothesis Test about a Population Hypothesis Test about a Population MeanMeann n >> 30 ? 30 ?

known ?known ?

Popul. Popul. approx.approx.normal normal

?? known ?known ?

Use Use ss to toestimate estimate

Use Use ss to toestimate estimate

Increase Increase nnto to >> 30 30/

xz

n

/

xz

n

/

xts n

/

xts n

/

xz

n

/

xz

n

/

xts n

/

xts n

YesYes

YesYes

YesYes

YesYes

NoNo

NoNo

NoNo

NoNo

Page 17: Ch 12  實習

Jia-Ying Chen17

Example 1

A federal agency responsible for enforcing laws governing weights and measures routinely inspects packages to determine whether the weight of the contents is at least as great as that advertised on the package. A random sample of 18 containers whose packaging states that the contents weigh 8 ounces was drawn. The contents were weighted and the results follows. Can we concluded at the 1% significance level that on average the containers are mislabeled? (Assume the random variable is normally distributed)

7.80 7.91 7.93 7.99 7.94 7.75 7.97 7.95 7.79 8.06 7.82 7.89 7.92 7.87 7.92 7.98 8.05 7.91

Page 18: Ch 12  實習

Jia-Ying Chen18

Solution

H0:μ=8

H1:μ<8

There is enough evidence to conclude that the average container is mislabeled

Page 19: Ch 12  實習

Jia-Ying Chen19

Example 2

How much money do winners go home with from the television quiz show Feopardy? To determine an answer, a random sample of winners was drawn and the amount of money each won was recorded and is listed here. Estimate with 95% confidence the mean winnings for all show’s players (Assume the random variable is normally distributed)

26650 6060 52820 8490 13660 25840 49840 23790 51480 18960 990 11450 41810 21060 7860

Page 20: Ch 12  實習

Jia-Ying Chen20

Solution

Page 21: Ch 12  實習

Example 3

A random sample of 10 college students was drawn from a large university. Their ages are 22, 17, 27, 20, 23, 19, 24, 18, 19, and 24 years. Assume the age is normal distributed. a. Estimate the population mean with 90% confidence. b. Test to determine if we can infer at the 5% significance

level that the population mean is not equal to 20. c. What is the required condition of the techniques used

in the previous questions? What graphical device can you use to check to see if that required condition is satisfied?

Jia-Ying Chen21

Page 22: Ch 12  實習

Solution

a. Thus, LCL = 19.446, and UCL = 23.154.

b. H0: μ = 20 vs. H1: μ ≠ 20

Rejection region: | t | > t0.025,9 = 2.262

Test statistic: t = 1.285

Conclusion: Don't reject H0. We can't infer at the 5% significance level that the population mean is not equal to 20.

The condition is that ages in the population are normally distributed. A histogram of the data can be used to check if the normality assumption is satisfied.

Jia-Ying Chen22

Page 23: Ch 12  實習

Jia-Ying Chen23

Inference About a Population Variance

Sometimes we are interested in making inference about the variability of processes.

Examples: The consistency of a production process for

quality control purposes. Investors use variance as a measure of risk.

To draw inference about variability, the parameter of interest is 2.

Page 24: Ch 12  實習

Jia-Ying Chen24

The sample variance s2 is an unbiased, consistent

and efficient point estimator for 2.

The statistic has a distribution called Chi-

squared, if the population is normally distributed. 2

2s)1n(

1n.f.ds)1n(

2

22

1n.f.ds)1n(

2

22

d.f. = 5

d.f. = 10

Inference About a Population Variance

Page 25: Ch 12  實習

Jia-Ying Chen25

Example 3 (operation management application) A container-filling machine is believed to fill 1

liter containers so consistently, that the variance of the filling will be less than 1 cc (.001 liter).

To test this belief a random sample of 25 1-liter fills was taken, and the results recorded

Do these data support the belief that the variance is less than 1cc at 5% significance level?

Testing the Population Variance

Page 26: Ch 12  實習

Jia-Ying Chen26

Solution The problem objective is to describe the population

of 1-liter fills from a filling machine. The data are interval, and we are interested in the

variability of the fills. The complete test is:

H0: 2 = 1

H1: 2 <1

21n,1

2

2

22

isregionrejectionThe

.s)1n(

isstatistictestThe

We want to know whether the process is consistent

We want to know whether the process is consistent

Testing the Population Variance

Page 27: Ch 12  實習

Jia-Ying Chen27

.hypothesisnulltherejectnotdo,78.208484.13Since

.8484.13

,78.201

78.20s)1n(

2

125,95.

2

1n,1

22

22

There is insufficient evidence to reject the hypothesis thatthe variance is less than 1.

There is insufficient evidence to reject the hypothesis thatthe variance is less than 1.

• Solving by hand– Note that (n - 1)s2 = (xi - x)2 = xi

2 – (xi)2/n – From the sample, we can calculate xi = 24,996.4,

and xi2 = 24,992,821.3

– Then (n - 1)s2 = 24,992,821.3-(24,996.4)2/25 =20.78

Testing the Population Variance

Page 28: Ch 12  實習

Jia-Ying Chen28

13.8484 20.8

Rejectionregion

8484.132 2

2125,95.

= .05 1- = .95

Do not reject the null hypothesis

Testing the Population VarianceTesting the Population Variance

Page 29: Ch 12  實習

Jia-Ying Chen29

Testing and Estimating a Population Variance

From the following probability statement

P(21-/2 < 2 < 2

/2) = 1-

we have (by substituting 2 = [(n - 1)s2]/2.)

22/1

22

22/

2 s)1n(s)1n(

22/1

22

22/

2 s)1n(s)1n(

Page 30: Ch 12  實習

Jia-Ying Chen30

Example 4

With gasoline prices increasing, drivers are becoming more concerned with their cars’ gasoline consumption. For the past 5 years, a driver has tracked the gas mileage of his car and found that the variance from fill-up to fill-up was σ2=23 mpg2. Now that his car is 5 years old, he would like to know whether the variability of gas mileage has changed. He recorded the gas mileage from his last eight fill-ups; these are listed here. Conduct a test at a 10% significance level to infer whether the variability has changed.

28 25 29 25 32 36 27 24

Page 31: Ch 12  實習

Jia-Ying Chen31

Solution

H0:σ2=23

H1:σ2≠23

Page 32: Ch 12  實習

Jia-Ying Chen32

Example 5

During annual checkups physician routinely send their patients to medical laboratories to have various tests performed. One such test determines the cholesterol level in patients’ blood. However, not all tests are conducted in the same way. To acquire more information, a man was sent to 10 laboratories and in each had his cholesterol level measured. The results are listed here. Estimate with 95% confidence the variance of these measurements.

4.70 4.83 4.65 4.60 4.75 4.88 4.68 4.75 4.80 4.90

Page 33: Ch 12  實習

Jia-Ying Chen33

Solution

Page 34: Ch 12  實習

Example 6

Which of the following conditions is needed regarding the chi-squared test statistic for the test of variance?

a. The population random variable must be normal. b. The test statistic must be a non-negative number. c. The test statistic must have a chi-squared

distribution with n - 1 degrees of freedom. d. All of these choices are true.

Jia-Ying Chen34

Page 35: Ch 12  實習

Jia-Ying Chen35

Inference About a Population Proportion

When the population consists of nominal data, the only inference we can make is about the proportion of occurrence of a certain value.

The parameter p was used before to calculate these probabilities under the binomial distribution.

Page 36: Ch 12  實習

Jia-Ying Chen36

.sizesamplen.successesofnumberthex

wherenx

.sizesamplen.successesofnumberthex

wherenx

Statistic and sampling distribution the statistic used when making inference about p is:

– Under certain conditions, [np > 5 and n(1-p) > 5], is approximately normally distributed, with

= p and 2 = p(1 - p)/n.p̂

Inference About a Population Proportion

Page 37: Ch 12  實習

Jia-Ying Chen37

Testing and Estimating the Proportion

Test statistic for p

Interval estimator for p (1- confidence level)

5)p1(nand5npwhere

n/)p1(ppp̂

Z

5)p1(nand5npwhere

n/)p1(ppp̂

Z

5)p̂1(nand5p̂nprovided

n/)p̂1(p̂zp̂ 2/

5)p̂1(nand5p̂nprovided

n/)p̂1(p̂zp̂ 2/

Page 38: Ch 12  實習

Jia-Ying Chen38

Example 7

A dean of a business school wanted to know whether the graduates of her school used a statistical inference technique during their first year of employment after graduation. She surveyed 314 graduates and asked about the use of statistical technique. After tallying up the responses, she found that 204 used statistical inference within one year of graduation. Estimate with 90% confidence the proportion of all business school graduates who use their statistical education within a year of graduation.

Page 39: Ch 12  實習

Jia-Ying Chen39

Solution

Page 40: Ch 12  實習

Jia-Ying Chen40

Example 8

In some states the law requires drivers to turn on their headlights when driving in the rain. A highway patrol officer believes that less than one-quarter of all drivers follow this rule. As a test, he randomly samples 200 cars driving in the rain and counts the number whose headlights are turned on. H finds this number to be 41. Does the officer have enough evidence at the 10% significance level to support his belief?

Page 41: Ch 12  實習

Jia-Ying Chen41

Solution

There is enough evidence to support the

officer’s belief

Page 42: Ch 12  實習

Jia-Ying Chen42

Selecting the Sample Size to Estimate the Proportion

Recall: The confidence interval for the proportion is

Thus, to estimate the proportion to within W, we can write

nppzp /)ˆ1(ˆˆ 2/

nppzW /)ˆ1(ˆ2/

Page 43: Ch 12  實習

Jia-Ying Chen43

Selecting the Sample Size to Estimate the Proportion

The required sample size is

2

2/ )ˆ1(ˆ

W

ppzn

2

2/ )ˆ1(ˆ

W

ppzn

Page 44: Ch 12  實習

Jia-Ying Chen4412.44

Selecting the Sample Size

Two methods – in each case we choose a value for then

solve the equation for n.

Method 1 : no knowledge of even a rough value of . This is a ‘worst case scenario’ so we substitute = .50

Method 2 : we have some idea about the value of . This is a better scenario and we substitute in our estimated value.

Page 45: Ch 12  實習

Jia-Ying Chen45

Example 9

As a manufacturer of golf clubs, a major corporation wants to estimate the proportion of golfers who are right-handed. How many golfers must be surveyed if they want to be within 0.02, with a 95% confidence?

a. Assume that there is no prior information that could be used as an estimate of .

b. Assume that the manufacturer has an estimate of found from a previous study, which suggests that 75% of golfers are right-handed.

Page 46: Ch 12  實習

Solution

a.

b.

取 n=1801

Jia-Ying Chen46

21.96 0.5 0.5( ) 2401

0.02n

21.96 0.75 0.25( ) 1800.75

0.02n