sma 6304 / mit 2.853 / mit 2.854 manufacturing systems ... · title: microsoft powerpoint -...

34
1 SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 9: Statistical Inference Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning.

Upload: others

Post on 27-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

1Copyright 2003 © Duane S. Boning. All rights reserved.

SMA 6304 / MIT 2.853 / MIT 2.854Manufacturing Systems

Lecture 9: Statistical Inference

Lecturer: Prof. Duane S. Boning

Copyright 2003 © Duane S. Boning.

Page 2: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

2Copyright 2003 © Duane S. Boning. All rights reserved.

Agenda

1. Review: Probability Distributions & Random Variables2. Sampling: Key distributions arising in sampling

• Chi-square, t, and F distributions3. Estimation:

Reasoning about the population based on a sample4. Some basic confidence intervals

• Estimate of mean with variance known• Estimate of mean with variance not known• Estimate of variance

5. Hypothesis tests

Copyright ©2003 Duane S. Boning.Copyright 2003 © Duane S. Boning.

Page 3: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

3Copyright 2003 © Duane S. Boning. All rights reserved.

Discrete Distribution: Bernoulli

• Bernoulli trial: an experiment with two outcomes

• Probability mass function (pmf):

x

f(x)

p1 - p

0 1

¼

¾

Copyright 2003 © Duane S. Boning.

Page 4: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

4Copyright 2003 © Duane S. Boning. All rights reserved.

Discrete Distribution: Binomial

• Repeated random Bernoulli trials

• n is the number of trials• p is the probability of “success” on any one trial• x is the number of successes in n trials

Copyright 2003 © Duane S. Boning.

Page 5: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

5Copyright 2003 © Duane S. Boning. All rights reserved.

Discrete Distribution: Poisson

• Poisson is a good approximation to Binomial when n is large and p is small (< 0.1)

• Example applications:– # misprints on page(s) of a book– # transistors which fail on first day of operation

• Mean:• Variance:

Copyright 2003 © Duane S. Boning.

Page 6: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

6Copyright 2003 © Duane S. Boning. All rights reserved.

Continuous Distributions

• Uniform Distribution• Normal Distribution

– Unit (Standard) Normal Distribution

Copyright 2003 © Duane S. Boning.

Page 7: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

7Copyright 2003 © Duane S. Boning. All rights reserved.

Continuous Distribution: Uniform

• pdfxa

1

b

xa b

• cdf

Copyright 2003 © Duane S. Boning.

Page 8: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

8Copyright 2003 © Duane S. Boning. All rights reserved.

Standard Questions You Should Be Able To Answer (For a Known cdf or pdf)

xa

1

b

xa b• Probability x sits within some range

• Probability x less than orequal to some value

Copyright 2003 © Duane S. Boning.

Page 9: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

9Copyright 2003 © Duane S. Boning. All rights reserved.

Continuous Distribution: Normal (Gaussian)

• cdf

0

0.16

0.5

0.84

1

• pdf

Copyright 2003 © Duane S. Boning.

Page 10: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

10Copyright 2003 © Duane S. Boning. All rights reserved.

Continuous Distribution: Unit Normal

• Normalization

• cdf

• Mean

• Variance

• pdf

Copyright 2003 © Duane S. Boning.

Page 11: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

11Copyright 2003 © Duane S. Boning. All rights reserved.

Using the Unit Normal pdf and cdf

• We often want to talk about “percentage points” of the distribution – portion in the tails

0.1

0.5

0.9

1

Copyright 2003 © Duane S. Boning.

Page 12: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

12Copyright 2003 © Duane S. Boning. All rights reserved.

Philosophy

The field of statistics is about reasoning in the face of

uncertainty, based on evidence from observed data

• Beliefs:– Distribution or model form– Distribution/model parameters

• Evidence:– Finite set of observations or data drawn from a population

• Models:– Seek to explain data

Copyright 2003 © Duane S. Boning.

Page 13: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

13Copyright 2003 © Duane S. Boning. All rights reserved.

Moments of the Population vs. Sample Statistics

• Mean

• Variance

• StandardDeviation

• Covariance

• CorrelationCoefficient

Population Sample

Copyright 2003 © Duane S. Boning.

Page 14: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

14Copyright 2003 © Duane S. Boning. All rights reserved.

Sampling and Estimation

• Sampling: act of making observations from populations• Random sampling: when each observation is identically

and independently distributed (IID)• Statistic: a function of sample data; a value that can be

computed from data (contains no unknowns) – average, median, standard deviation

Copyright 2003 © Duane S. Boning.

Page 15: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

15Copyright 2003 © Duane S. Boning. All rights reserved.

Population vs. Sampling Distribution

Population(probability density function)

Sample Mean(statistic)

n = 20

n = 10

n = 2

Sample Mean(sampling distribution)

Copyright 2003 © Duane S. Boning.

Page 16: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

16Copyright 2003 © Duane S. Boning. All rights reserved.

Sampling and Estimation, cont.

• Sampling• Random sampling• Statistic• A statistic is a random variable, which itself has a

sampling distribution– I.e., if we take multiple random samples, the value for the statistic

will be different for each set of samples, but will be governed by the same sampling distribution

• If we know the appropriate sampling distribution, we can reason about the population based on the observed value of a statistic– E.g. we calculate a sample mean from a random sample; in what

range do we think the actual (population) mean really sits?

Copyright 2003 © Duane S. Boning.

Page 17: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

17Copyright 2003 © Duane S. Boning. All rights reserved.

Sampling and Estimation – An Example

• Suppose we know that the thickness of a part is normally distributed with std. dev. of 10:

• We sample n = 50 random parts and compute the mean part thickness:

• First question: What is distribution of

• Second question: can we use knowledge of distribution to reason about the actual (population) mean µgiven observed (sample) mean?

Copyright 2003 © Duane S. Boning.

Page 18: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

18Copyright 2003 © Duane S. Boning. All rights reserved.

Estimation and Confidence Intervals

• Point Estimation: – Find best values for parameters of a distribution– Should be

• Unbiased: expected value of estimate should be true value• Minimum variance: should be estimator with smallest variance

• Interval Estimation: – Give bounds that contain actual value with a given

probability– Must know sampling distribution!

Copyright 2003 © Duane S. Boning.

Page 19: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

19Copyright 2003 © Duane S. Boning. All rights reserved.

Confidence Intervals: Variance Known

• We know σ, e.g. from historical data• Estimate mean in some interval to (1-α)100% confidence

0.1

0.5

0.9

1

• Remember the unit normal percentage points

• Apply to the sampling distribution for the sample mean

Copyright 2003 © Duane S. Boning.

Page 20: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

20Copyright 2003 © Duane S. Boning. All rights reserved.

95% confidence interval, α = 0.05

Example, Cont’d

• Second question: can we use knowledge of distribution to reason about the actual (population) mean µ given observed (sample) mean?

n = 50

~95% of distributionlies within +/- 2σ of mean

Copyright 2003 © Duane S. Boning.

Page 21: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

21Copyright 2003 © Duane S. Boning. All rights reserved.

Reasoning & Sampling Distributions

• Example shows that we need to know our sampling distribution in order to reason about the sample and population parameters

• Other important sampling distributions:– Student-t

• Use instead of normal distribution when we don’t know actual variation or σ

– Chi-square• Use when we are asking about variances

– F• Use when we are asking about ratios of variances

Copyright 2003 © Duane S. Boning.

Page 22: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

22Copyright 2003 © Duane S. Boning. All rights reserved.

Sampling: The Chi-Square Distribution

• Typical use: find distribution of variance when mean is known

• Ex:

So if we calculate s2, we can use knowledge of chi-square distribution to put bounds on where we believe the actual (population) variance sits

0 5 10 15 20 25 300

0.010.020.030.040.050.060.070.080.090.1

Copyright 2003 © Duane S. Boning.

Page 23: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

23Copyright 2003 © Duane S. Boning. All rights reserved.

• Typical use: Find distribution of average when σ is NOT known• For k →∞, tk→ N(0,1)

• Consider xi ~ N(µ, σ2) . Then

• This is just the “normalized” distance from mean (normalized to our estimate of the sample variance)

Sampling: The Student-t Distribution

Copyright 2003 © Duane S. Boning.

Page 24: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

24Copyright 2003 © Duane S. Boning. All rights reserved.

Back to our Example

• Suppose we do not know either the variance or the mean in our parts population:

• We take our sample of size n = 50, and calculate

• Best estimate of population mean and variance (std.dev.)?

• If had to pick a range where µ would be 95% of time?Have to use the appropriate sampling distribution:In this case – the t-distribution (rather than normaldistribution)

Copyright 2003 © Duane S. Boning.

Page 25: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

25Copyright 2003 © Duane S. Boning. All rights reserved.

Confidence Intervals: Variance Unknown

• Case where we don’t know variance a priori• Now we have to estimate not only the mean based on

our data, but also estimate the variance• Our estimate of the mean to some interval with

(1-α)100% confidence becomes

Note that the t distribution is slightly wider than the normaldistribution, so that our confidence interval on the true mean is not as tight as when we know the variance.

Copyright 2003 © Duane S. Boning.

Page 26: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

26Copyright 2003 © Duane S. Boning. All rights reserved.

Example, Cont’d

• Third question: can we use knowledge of distribution to reason about the actual (population) mean µ given observed (sample) mean – even though we weren’t told σ?

n = 50t distribution is

slightly wider thangaussian distribution

95% confidence interval

Copyright 2003 © Duane S. Boning.

Page 27: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

27Copyright 2003 © Duane S. Boning. All rights reserved.

Once More to Our Example

• Fourth question: how about a confidence interval on our estimate of the variance of the thickness of our parts, based on our 50 observations?

Copyright 2003 © Duane S. Boning.

Page 28: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

28Copyright 2003 © Duane S. Boning. All rights reserved.

Confidence Intervals: Estimate of Variance

• The appropriate sampling distribution is the Chi-square• Because χ2 is asymmetric, c.i. bounds not symmetric.

Copyright 2003 © Duane S. Boning.

Page 29: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

29Copyright 2003 © Duane S. Boning. All rights reserved.

0 10 20 30 40 50 60 70 80 90 1000

0.005

0.01

0.015

0.02

0.025

0.03

0.035

0.04

0.045

Example, Cont’d

• Fourth question: for our example (where we observed sT2 =

102.3) with n = 50 samples, what is the 95% confidence interval for the population variance?

Copyright 2003 © Duane S. Boning.

Page 30: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

30Copyright 2003 © Duane S. Boning. All rights reserved.

Sampling: The F Distribution

• Typical use: compare the spread of two populations• Example:

– x ~ N(µx, σ2x) from which we sample x1, x2, …, xn

– y ~ N(µy, σ2y) from which we sample y1, y2, …, ym

– Then

or

Copyright 2003 © Duane S. Boning.

Page 31: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

31Copyright 2003 © Duane S. Boning. All rights reserved.

Concept of the F Distribution

• Assume we have a normally distributed population

• We generate two different random samples from the population

• In each case, we calculate a sample variance si

2

• What range will the ratio of these two variances take?

⇒ F distribution

• Purely by chance (due to sampling) we get a range of ratios even though drawing from same population

Example:

• Assume x ~ N(0,1)

• Take samples of size n = 20

• Calculate s12 and s2

2 and take ratio

• 95% confidence interval on ratio

Large range in ratio!

Copyright 2003 © Duane S. Boning.

Page 32: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

32Copyright 2003 © Duane S. Boning. All rights reserved.

Hypothesis Testing

• A statistical hypothesis is a statement about the parameters of a probability distribution

• H0 is the “null hypothesis”– E.g. – Would indicate that the machine is working correctly

• H1 is the “alternative hypothesis”– E.g.– Indicates an undesirable change (mean shift) in the machine

operation (perhaps a worn tool)

• In general, we formulate our hypothesis, generate a random sample, compute a statistic, and then seek to reject H0 or fail to reject (accept) H0 based on probabilities associated with the statistic and level of confidence we select

Copyright 2003 © Duane S. Boning.

Page 33: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

33Copyright 2003 © Duane S. Boning. All rights reserved.

Which Population is Sample x From?• Two error probabilities in decision:

– Type I error: “false alarm”– Type II error: “miss”– Power of test (“correct alarm”)

Consider H1 an“alarm” condition

Set decision point (and sample size) based on acceptable α, β risks

Consider H0 the“normal” condition

• Control charts are hypothesis tests:– Is my process “in control” or has a significant change occurred?

Copyright 2003 © Duane S. Boning.

Page 34: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems ... · Title: Microsoft PowerPoint - lec09.ppt Author: cc_skaran Created Date: 4/25/2005 11:59:56 AM

34Copyright 2003 © Duane S. Boning. All rights reserved.

Summary1. Review: Probability Distributions & Random Variables2. Sampling: Key distributions arising in sampling

• Chi-square, t, and F distributions3. Estimation: Reasoning about the population based on a sample4. Some basic confidence intervals

• Estimate of mean with variance known• Estimate of mean with variance not known• Estimate of variance

5. Hypothesis tests

Next Time:1. Are effects (some variable) significant?⇒ ANOVA (Analysis of Variance)

2. How do we model the effect of some variable(s)?⇒ Regression modeling

Copyright 2003 © Duane S. Boning.