hypothesis testing-tests of proportions and variances in six sigma

34

Transcript of hypothesis testing-tests of proportions and variances in six sigma

What is 1 proportion test?

• Use the 1 proportion test to estimate the proportion of a population and compare it to a target or reference value.

• Calculate a range of values that is likely to include the population proportion.

• 1 Proportion test uses bothBINOMIAL DISTRIBUTION & NORMAL APPROXIMATION

MINITAB• To perform this test, select Stat > Basic Statistics > 1 Proportion.

Example : In a simple random sample of 600 men taken from a big city 400 are found to be smokers. Test the hypothesis that 60% of the men are smokers.

Ho: The 60% of men are smokers. (Given P = 0.6) H1: The percentage of smokers is not equal to 60% (P 0.6)

Proportion of smokers = p = 400/600 = 0.666

SE(p) = √pq/n = (0.666*0.334/600)^0.5 = (0.000371)^0.5=

= 0.0193

Z = (p-P)/ SE(p) = (0.666-0.6)/SE = 0.066/0.0.0193 = 3.42 ;

The difference between observed and expected proportion of smoker is more than 1.96 SE (5% level of significance) .

Hence our hypothesis is rejected and we conclude that the the proportion of smokers in the city is greater than 60%.

Ex- ( 1 Proportion ) : using MINITAB

Rejection of Bearings Null Hypothesis H0 : p = .29

Alternative Hypothesis H1 : p < .29 n = 80 r=15 p=15/80 = 0.1875 Test of p = 0.29 vs p < 0.29 95% Upper Exact

Sample X N Sample p Bound P-Value1 15 80 0.187500 0.273933 0.025  Null hypothesis H0 is rejected.The rejections of bearings have reduced.

What is 2 proportions test?

•Use this analysis to: Determine whether the proportions of two groups differ

•Calculate a range of values that is likely to include the difference between the population proportions

•2 Proportions test uses a NORMAL APPROXIMATION by default

MINITAB•To perform this test, select Stat > Basic Statistics > 2 Proportions.

H0: ρ1- ρ2 = d0 The difference between the population proportions (ρ1- ρ2) equals the hypothesized difference (d0).

H1: ρ1- ρ2 ≠ d0 The difference between the population proportions (ρ1- ρ2) does not equal the hypothesized difference (d0).

H1: ρ1- ρ2 > d0 The difference between the population proportions (ρ1- ρ2) is greater than the hypothesized difference (d0).

H1: ρ1- ρ2 < d0 The difference between the population proportions (ρ1- ρ2) is greater than the hypothesized difference (d0).

Hypotheses for 2 proportions testFor 2 Proportions, the hypotheses are:

Null hypothesis

Alternative hypothesis Choose one:

Ex-: ( 2- Proportions ) : using MINITAB Null Hypothesis H0 : p1 = p2

Alternative Hypothesis H1 : p1 ≠ p2

 

n1= 45 r1= 12

n2= 50 r2 = 5 Sample X N Sample p1 12 45 0.2666672 5 50 0.100000 Difference = p (1) - p (2)Estimate for difference: 0.16666795% CI for difference: (0.0130165, 0.320317)Test for difference = 0 (vs not = 0): Z = 2.13 P-Value = 0.034 Fisher's exact test: P-Value = 0.059 (for events <5) Null hypothesis H0 is rejected.The two proportions are significantly different

Tests for Variances

One-sample test for variance (chi-square test)For comparing variances when the population variance is known, the test statistic formula is as follows:

X2 = Chi-square = ∑ (Zi)2

X² = (sample variance × (n - 1)) / known variance

X2 = Chi-square = ∑ (O-E)2/E with (n-1) df.

Testing σ Against a Standard►Hypotheses

• 1. H0: σ = σ0 2. H0: σ ≤ σ0 3. H0: σ ≥ σ0

HA: σ ≠ σ0 HA: σ > σ0 HA: σ < σ0

►Test Statistic

►Reject H0 if

20

22 )1(

sn

s = Sample standard deviation computed from n observations

1,122

1,22

1,2/122

1,2/22

.3

.2

.1

n

n

nn or

Lower 1-(α/2) percentage point of the chi-square distribution with n-1 d.f.

Upper α/2 or α percentage point of the chi-square distribution with n-1 d.f.

Ex-: ( 1- Variance ) MACHINE ADJUSTED TO MEET A STANDARD VALUE OF σ

Null Hypothesis H0 : σ 2 = σ0 2

Alternative Hypothesis H1 : σ 2 < σ0 2

n = 16 s2 = 2.76 s = 1.66

Null hypothesis Sigma σ = 2.4Alternative hypothesis Sigma σ = < 2.4

N StDev Variance16 1.66 2.76

95% One-Sided Confidence Intervals

Upper Bound` Upper BoundMethod for StDev for VarianceStandard 2.39 5.69TestsMethod Chi-Square DF P-ValueStandard 7.18 15 0.047Null hypothesis is rejected.Variance has significantly reduced.

Why should I use a 2-variances test?

• Use this analysis to: Determine whether the variances or standard deviations of two groups differ.

• Calculate a range of values that is likely to include the population ratio of the variances or standard deviations of the two groups.

MINITAB• To perform this test, select Stat > Basic Statistics > 2 Variances.

H0: σ1 / σ2 = K The ratio between the first population standard deviation (σ1) and the second population standard deviation (σ2) is equal to the hypothesized ratio (K).

H1: σ1 / σ2 ≠ K The ratio between the first population standard deviation (σ1)and the second population standard deviation (σ2) does not equal the hypothesized ratio (K).

H1: σ1 / σ2 > K The ratio between the first population standard deviation (σ1)and the second population standard deviation (σ2) is greater than the hypothesized ratio (K).

H1: σ1 / σ2 > K The ratio between the first population standard deviation (σ1)and the second population standard deviation (σ2) is less than the hypothesized ratio (K).

HYPOTHESES For 2 Variances are: Null hypothesis

Alternative hypothesis Choose one:

Pizza Experiment :Subject 1 2 3 4 5 6 7 8 9 10 Mean s. d

Pizza A 12.9 5.7 16.0 14.3 2.4 1.6 14.6 10.2 4.3 6.6 8.86 5.40

Pizza B 16.0 7.5 16.0 14.0 13.2 3.4 15.5 11.3 15.4 10.6 12.29 4.18

F Test :Testing Variances of Two Populations

H0: σ12 = σ2

2

H1: σ12 ≠ σ2

2

H0: σ12 = σ2

2

H1: σ12 > σ2

2

H0: σ12 = σ2

2

H1: σ12 < σ2

2

Hypotheses

21

22

0s

sF

22

21

0s

sF

2122

21

0 , sss

sF

Test Statistic

1,1,2/0 21 nnFF

1,1,0 21 nnFF

1,1,0 12 nnFF

H0 Rejection criteria

In the previous pizza example, standard deviation in the two cases are 5.40 and 4.18. Assuming two sided alternative,

F0 = 5.402/4.182 = 1.67 < F.025, 9, 9 = 4.03

H0 not rejected – Two variances are not significantly different

22

23

Test for Equal VariancesLevel1 Old ProcessLevel2 New Process

ConfLvl 95.0000

Bonferroni confidence intervals for standard deviations Lower Sigma Upper N Factor Levels 5.23095 9.34345 32.3241 5 Old Process 0.95953 1.82574 8.6467 4 New Process

 F-Test (normal distribution)

Test Statistic: 26.190

P-Value : 0.023

Levene's Test (any continuous distribution)Test Statistic: 2.845P-Value : 0.136

Test for Equal Variances: Old Process vs New Process

Two-Sample T-Test and CI: Old Process, New Process

 

Old Proc New Proc

10

20

30

Boxplots of Old Proc and New Proc(means are indicated by solid circles)

Which test should I base my conclusion on?

Levene's method VS Bonett's method

•By default, Minitab's 2 variance command displays results for both Levene's method and Bonett's method.

•both methods give you a type I error rate that is close to your specified significance level (also known as alpha or α).

•Bonett's method is usually more powerful, unless the following are true: • Your samples have less than 20 observations each. • The distribution for one or more of the populations is extremely skewed or has

heavy tails. Compared to the normal distribution, a distribution with heavy tails has more data at its lower and upper ends.

When you have small samples from very skewed, or heavy-tailed distributions, the type I error rate for Bonett's method can be higher than α. Under these conditions, if Levene's method gives you a smaller confidence interval than Bonett's method, then you should base your conclusions on Levene's method. Otherwise, you can base your conclusions on Bonett's method, but remember that your type I error rate is likely to be greater than α.

• To improve processes, we need to identify factors which impact the mean and/or standard deviation.

• Once we have identified these factors and made adjustments for improvement, we need to validate improvements in our processes.

• Sometimes, we cannot easily determine if an apparent change is real, because the magnitude of the change is not large relative to process and measurement variation.

• In such cases we perform a quantitative statistical hypothesis test to decide objectively whether there is a difference.

• Use Hypothesis Tests to Eliminate Guessing.• This Way Everyone Makes the Same Decision.

• Use Hypothesis Tests to Eliminate Guessing.• This Way Everyone Makes the Same Decision.

Hypothesis Testing DMAICStep 6

Hypothesis Testing

Determine Hypothesis

Calculate the P-value

P value<.05 ?

No statistical evidence for a difference Statistical evidence for a difference

Comparing Two Situations – Asking “Are they different?”Ho: Null Hypothesis – There is no differenceHa: Alternate Hypothesis – There is a difference

YESNO

Test type: depends on what you want to know

Can notRejectNull

Hypothesis

RejectNull

Hypothesis

Hypothesis is usuallystated as “no difference”

DMAICStep 6

TruthTruth

HoHo Ha

Ha

Do NotReject Ho

Do NotReject Ho

Reject HoReject Ho

Type IError

a

Type IIError

b

CorrectDecision

CorrectDecision

Hypothesis Testing

Truth Table

Type II Error

You do not reject Ho

when Ha is true

Type I Error

You reject Ho

when Ho is true

The P-value is the probability of making a Type I error.

When a = 0.05 then P-value < 0.05 is our judgment criterion.

We say that the decision is made at the 95% (1-a) confidence level.

DMAICStep 6

One Sample Two Samples Multiple Samples

Study Stability

(Run Chart)

Study Shape(Histogram, DotPlot, Normality)

Study Spread(Chi Square-Test)

Data paired?

Study Spread(F-test)

Study Centering(2 sample t-test)

Study Centering(1 sample t-test)

Study Centering(Paired t-test)

Study Centering(ANOVA)

Study Spread(Homogeneity of Variance)

Continuous Data Analysis Road Map DMAICStep 6

Homogeneity of Variance

• The hypothesis test for comparing variances

• Valid for normal and non-normal data

Comparing Variances with Minitab

Null Hypothesis – No differences between the variances

Ho : 12 = 2

2 = . . . = k2

Can not reject Ho when p > 0.05

Alternate Hypothesis – At least one of the variances is different

Ha : A2 ¹ B

2

Reject Ho when p < 0.05

DMAICStep 6

Problem Statement : The total height of the machined lower transmission housing on the washing machine affects brake performance. The CTQ of interest is Total Height, with a target = 5.394”. Because we want a high Z process, it is also important to have a low variance. There are 8 fixtures that hold the part for machining. Is fixture an important X variable? Use hypothesis tests and confidence intervals to determine if there is any indication of a difference among the variances.

Overall height -- Data Listing Box Plot

Homogeneity of Variance test : Example DMAICStep 6

Row fix 1 fix 2 fix 3 fix 4 fix 5 fix 6 fix 7 fix 8

1 5.39 5.387 5.394 5.388 5.386 5.388 5.388 5.3882 5.389 5.387 5.394 5.389 5.384 5.388 5.389 5.3893 5.39 5.387 5.393 5.388 5.385 5.388 5.388 5.3884 5.389 5.387 5.394 5.39 5.385 5.388 5.388 5.3885 5.388 5.388 5.394 5.389 5.384 5.388 5.388 5.3886 5.391 5.388 5.395 5.392 5.387 5.391 5.391 5.397 5.391 5.389 5.396 5.391 5.388 5.391 5.392 5.3918 5.391 5.389 5.397 5.391 5.387 5.391 5.391 5.399 5.391 5.388 5.395 5.391 5.387 5.39 5.389 5.389

10 5.389 5.387 5.395 5.39 5.387 5.39 5.389 5.39

How to Compare the variances of all 8 fixtures ?

Click OK to run command

Homogeneity of Variance

Stat>ANOVA>Homogeneity of Variance (Note: Data must be stacked for this test to run)

• Bartlett’s Test - Normal Data• Levene’s Test - Non-Normal Data

Homogeneity of Variance

Minitab File :ht-var-test.mtw

DMAICStep 6

0.0005 0.0015 0.0025 0.0035

95% Confidence Intervals for Sigmas

Bartlett's Test

Test Statistic: 4.298

P-Value : 0.745

Levene's Test

Test Statistic: 0.818

P-Value : 0.576

Factor Levels

1

2

3

4

5

6

7

8

Homogeneity of Variance Test for total ht

Homogeneity of Variance Test

p values > .05,Can not reject Ho

We can standardized on the Levene’s test because it is more robust to small sample sizes and non-normality of samples.

Statistical conclusion: We cannot conclude that the variation is different between the 8 fixtures.

The differences we observed in the graph may be due to chance.

Statistical conclusion: We cannot conclude that the variation is different between the 8 fixtures.

The differences we observed in the graph may be due to chance.

DMAICStep 6