week 7 october 13-17 three mini-lectures qmm 510 fall 2014

30
Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

Upload: emerald-boyd

Post on 20-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

Week 7 October 13-17

Three Mini-Lectures QMM 510Fall 2014

Page 2: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-2

• A proportion is a mean of data whose only values are 0 or 1.

Ch

apter 8

Confidence Interval ML 7.1For a Proportion ()

Number of "successes"

1's 56

1 0 0 0 0 1 1 0 0 00 0 1 0 1 0 0 1 0 01 1 1 1 0 1 1 1 1 10 1 0 1 1 0 0 1 0 11 1 1 1 1 1 1 0 0 00 1 1 1 1 0 1 1 1 01 0 1 1 1 1 1 1 1 00 1 1 1 0 0 0 1 0 00 0 0 0 0 1 0 1 0 00 1 1 0 1 1 1 1 1 1

Sample of 100 Binary Outcomes

Page 3: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-3

• The distribution of a sample proportion p = x/n is symmetric if p = .50.

• The distribution of p approaches normal as n increases, for any .p

Applying the CLT

Ch

apter 8

Confidence Interval for a Proportion ()

Page 4: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-4

• Rule of Thumb: The sample proportion p = x/n may be assumed to be normal if both np 10 and n(1p) 10.

When Is It Safe to Assume Normality of p?

Sample size to assume normality:

Table 8.9

Ch

apter 8

Confidence Interval for a Proportion ()

Rule: It is safe to assume normality of p = x/n if we have at least 10 “successes” and 10 “failures” in the sample.

Page 5: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-5

Confidence Interval for p

• The confidence interval for the unknown p (assuming a large sample) is based on the sample proportion p = x/n.

Ch

apter 8

Confidence Interval for a Proportion ()

Page 6: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-6

Example: Auditing

Ch

apter 8

Confidence Interval for a Proportion ()

Page 7: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-7

Ch

apter 8

Estimating from Finite PopulationN = population size; n = sample size

• The FPCF narrows the confidence interval somewhat.• When the sample is small relative to the population, the FPCF has little

effect. If n/N < .05, it is reasonable to omit it (FPCF 1 ).

Page 8: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-8

• To estimate a population mean with a precision of + E (allowable error), you would need a sample of size n. Now,

Sample Size to Estimate m

Ch

apter 8

Sample Size Determination ML 7-2

Page 9: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-9

• Method 1: Take a Preliminary SampleTake a small preliminary sample and use the sample s in place of s in the sample size formula.

• Method 2: Assume Uniform PopulationEstimate rough upper and lower limits a and b and set s = [(b a)/12]½.

How to Estimate s?

Ch

apter 8

• Method 3: Assume Normal PopulationEstimate rough upper and lower limits a and b and set s = (b a)/4. This assumes normality with most of the data within m ± 2s so the range is 4s.

• Method 4: Poisson ArrivalsIn the special case when m is a Poisson arrival rate, then s = .m

Sample Size Determination for a Mean

Page 10: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-10

Using MegaStat

Ch

apter 8

Sample Size Determination for a Mean

For example, how large a sample is needed to estimate the population mean age of college professors with 95 percent confidence and precision of ± 2 years, assuming a range of 25 to 70 years (i.e., 2 years allowable error)? To estimate σ, we assume a uniform distribution of ages from 25 to 70:

2(70 25)13

12

2 2 2 2

2 2

(1.96) (13)163

2

zn

E

Page 11: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-11

• To estimate a population proportion with a precision of ± E (allowable error), you would need a sample of size n.

• Since p is a number between 0 and 1, the allowable error E is also between 0 and 1.

Ch

apter 8

Sample Size Determination for a Mean

Page 12: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-12

• Method 1: Assume that p = .50 This conservative method ensures the desired precision. However, the sample may end up being larger than necessary.

• Method 2: Take a Preliminary SampleTake a small preliminary sample and use the sample p in place of p in the sample size formula.

• Method 3: Use a Prior Sample or Historical DataHow often are such samples available? p might be different enough to make it a questionable assumption.

How to Estimate p?

Ch

apter 8

Sample Size Determination for a Mean

Page 13: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

8-13

Using MegaStat

Ch

apter 8

Sample Size Determination for a Mean

2 2

2 2

(1 ) (1.96) (.50)(1 .50)2401

(.02)

zn

E

For example, how large a sample is needed to estimate the population proportion with 95 percent confidence and precision of ± .02 (i.e., 2% allowable error)?.

Page 14: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-14

One-Sample Hypothesis Tests ML 7-3C

hap

ter 9

Learning Objectives

LO9-1: List the steps in testing hypotheses.

LO9-2: Explain the difference between H0 and H1.

LO9-3: Define Type I error, Type II error, and power.

LO9-4: Formulate a null and alternative hypothesis for μ or π.

Page 15: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-15

Ch

apter 9

Logic of Hypothesis Testing

Page 16: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-16

• Hypotheses are a pair of mutually exclusive, collectively exhaustive statements about some fact about a population.

• One statement or the other must be true, but they cannot both be true.

• H0: Null hypothesisH1: Alternative hypothesis

• These two statements are hypotheses because the truth is unknown.

State the Hypothesis

Ch

apter 9

LO9-2: Explain the difference between H0 and H1.

Logic of Hypothesis Testing

Page 17: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-17

• Efforts will be made to reject the null hypothesis.• If H0 is rejected, we tentatively conclude H1 to be the case. • H0 is sometimes called the maintained hypothesis.• H1 is called the action alternative because action may be required if we

reject H0 in favor of H1.

State the Hypothesis

Ch

apter 9

Can Hypotheses Be Proved?

• We cannot accept a null hypothesis; we can only fail to reject it.

Role of Evidence

• The null hypothesis is assumed true and a contradiction is sought.

Logic of Hypothesis Testing

Page 18: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-18

Types of Error• Type I error: Rejecting the null hypothesis when it is true. This occurs

with probability a (level of significance). Also called a false positive.• Type II error: Failure to reject the null hypothesis when it is false. This

occurs with probability b. Also called a false negative.

Ch

apter 9

LO9-3: Define Type I error, Type II error, and power.

Logic of Hypothesis Testing

Page 19: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-19

Probability of Type I and Type II Errors

• If we choose a = .05, we expect to commit a Type I error about 5 times in 100.

• b cannot be chosen in advance because it depends on a and the sample size.

• A small b is desirable, other things being equal.

Ch

apter 9

Logic of Hypothesis Testing

Page 20: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-20

Power of a Test

Ch

apter 9

• A low b risk means high power.• Larger samples lead to increased power.

Logic of Hypothesis Testing

Page 21: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-21

Relationship between a and b

• Both a small a and a small b are desirable.• For a given type of test and fixed sample size, there is a trade-off

between a and b.• The larger critical value needed to reduce a risk makes it harder to

reject H0, thereby increasing b risk.• Both a and b can be reduced simultaneously only by increasing the

sample size.

Ch

apter 9

Logic of Hypothesis Testing

Page 22: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-22

Consequences of Type I and Type II Errors

• The consequences of these two errors are quite different, and the costs are borne by different parties.

• Example: Type I error is convicting an innocent defendant, so the costs are borne by the defendant. Type II error is failing to convict a guilty defendant, so the costs are borne by society if the guilty person returns to the streets.

• Firms are increasingly wary of Type II error (failing to recall a product as soon as sample evidence begins to indicate potential problems.)

Ch

apter 9

Logic of Hypothesis Testing

Page 23: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-23

• A statistical hypothesis is a statement about the value of a population parameter.• A hypothesis test is a decision between two competing mutually exclusive and

collectively exhaustive hypotheses about the value of the parameter.• When testing a mean we can choose between three tests.

Ch

apter 9

Statistical Hypothesis Testing

LO9-4: Formulate a null and alternative hypothesis for μ or π.

Page 24: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-24

• The direction of the test is indicated by H1:

Ch

apter 9

> indicates a right-tailed test< indicates a left-tailed test≠ indicates a two-tailed test

Statistical Hypothesis Testing

One-Tailed and Two-Tailed Tests

Page 25: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-25

Decision Rule

• A test statistic shows how far the sample estimate is from its expected value, in terms of its own standard error.

• The decision rule uses the known sampling distribution of the test statistic to establish the critical value that divides the sampling distribution into two regions.

• Reject H0 if the test statistic lies in the rejection region.

Ch

apter 9

Statistical Hypothesis Testing

Page 26: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-26

Decision Rule for Two-Tailed Test

• Reject H0 if the test statistic < left-tail critical value or if the test statistic > right-tail critical value.

Ch

apter 9

Statistical Hypothesis Testing

Page 27: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-27

When to use a One- or Two-Sided Test

• A two-sided hypothesis test (i.e., µ ≠ µ0) is used when direction (< or >) is of no interest to the decision maker.

• A one-sided hypothesis test is used when - the consequences of rejecting H0 are asymmetric, or - where one tail of the distribution is of special importance to the researcher.

• Rejection in a two-sided test guarantees rejection in a one-sided test, other things being equal.

Ch

apter 9

Statistical Hypothesis Testing

Page 28: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-28

Decision Rule for Left-Tailed Test• Reject H0 if the test statistic < left-tail critical value.

Figure 9.2

Ch

apter 9

Statistical Hypothesis Testing

Page 29: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-29

Decision Rule for Right-Tailed Test• Reject H0 if the test statistic > right-tail critical value.

Ch

apter 9

Statistical Hypothesis Testing

Page 30: Week 7 October 13-17 Three Mini-Lectures QMM 510 Fall 2014

9-30

Type I Error

• A reasonably small level of significance a is desirable, other things being equal.

• Chosen in advance, common choices for a are .10, .05, .025, .01, and .005 (i.e., 10%, 5%, 2.5%, 1%, and .5%).

• The a risk is the area under the tail(s) of the sampling distribution.• In a two-sided test, the a risk is split with a/2 in each tail since there

are two ways to reject H0.

Ch

apter 9

Statistical Hypothesis Testing

also called a false positive