hypothesis test procedure in minitab

53
HYPOTHESIS TEST PROCEDURE AIG Confidential & Proprietary 1 Hypothesis Test Procedure Document ID: AIG/P/01 Version: 1.0 Advance Innovation Group A 43, Sector 56, NOIDA, UP, INDIA-201301 Tel. +91.120.4540759 www.advanceinnovationgroup.com

Upload: advance-innovation-group-wwwadvanceinnovationgroupcom

Post on 07-May-2015

2.686 views

Category:

Education


12 download

DESCRIPTION

This post from Advance Innovation Group (http://www.advanceinnovationgroup.com) is document on step by step instruction on how to conduct different hypothesis tests in Minitab. It is detail description of Name of the test, When to perform, how to perform & what to conclude from the result, thus making hypothesis testing in Minitab a cake walk exercise.

TRANSCRIPT

Page 1: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

1

Hypothesis Test Procedure

Document ID: AIG/P/01

Version: 1.0

Advance Innovation Group A 43, Sector 56, NOIDA, UP, INDIA-201301

Tel. +91.120.4540759

www.advanceinnovationgroup.com

Page 2: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

2

Document Revision History :

Date Document

Version Document Revision Comments Prepared By Reviewed By Approved By

21 August 2009

1.0 Devendra Singh

Pranay kr. Shruti Singh

Distribution List:

Date Document Version Document Sent To Purpose

References:

Reference Document Name Description Page No.

None

Proprietary Notice: This document contains proprietary information that is confidential to Advance

Innovation Group. Disclosure of this document in full or in part, may result in material damage to

Advance Innovation Group. Written permission must be obtained from Advance Innovation Group prior

to the disclosure of this document to a third party..

Page 3: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

3

Contents 1.0 Test for CYCX ........................................................................................................................................... 5

1.1Regression ............................................................................................................................................ 5

1.2 Scatter Plot .......................................................................................................................................... 7

2.0 Test for CYDX ......................................................................................................................................... 10

I Sample T Test ........................................................................................................................................ 10

Sample Z test ........................................................................................................................................... 12

2 Sample T Test ....................................................................................................................................... 17

Stacking of Data ...................................................................................................................................... 19

Test for Equal Variance ........................................................................................................................... 20

1 Way Anova ........................................................................................................................................... 23

Turkey’s Family Error Rate (Part of 1 Way Anova) .................................................................................. 26

2 Way Anova ........................................................................................................................................... 28

3.0 Test for DYCX: ................................................................................................................................. 32

3.1 Binary Logistic Regression ........................................................................................................... 32

4.0 Test for DYDX .................................................................................................................................. 34

4.1 1 Proportion Test ........................................................................................................................ 34

4.2 2 Proportion test: ........................................................................................................................ 36

4.3 Chi Square Test: ............................................................................................................................... 38

NON PARAMETRIC TESTS ........................................................................................................................... 45

1-Sample Sign Test : ................................................................................................................................ 45

Mann Whitney: ....................................................................................................................................... 47

Moods Median Test: ............................................................................................................................... 49

Kruskal-Wallis Test .................................................................................................................................. 51

Page 4: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

4

Page 5: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

5

1 Test for CYCX

1.1Regression

This test is conducted to verify relationship between Y and X and to quantify the nature of relationship.

When we conduct the regression test the first value that we look at is the P value to accept or reject the

Null Hypothesis.

Ho: There is no relation between Y and X

Ha: There is relation.

Page 6: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

6

In the above example as P<0.05, we will agree to the equation given above in the red box.

Page 7: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

7

1.2 Scatter Plot

When is it used?

• You have a set of paired data for two continuous variables.

• You wish to visually check for evidence of any kind of relationship between the variables.

Page 8: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

8

Page 9: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

9

As depicted from the above diagram, it can be concluded that salt content and water has some

relationship.

Page 10: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

10

2.0 Test for CYDX

2.1 1 Sample T Test

This test is used when you want to compare the means of two samples.

Ho: µ1= µ2 Ha: µ1 is not equal to µ2.

Page 11: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

11

Enter the column

which contain data

Enter the

standard

Check the

box

Page 12: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

12

Here P is less than 0.05, so reject Ho.

2.2 1 Sample Z test

This test is similar to the 1 Sample T, just that the std dev of the process should also be known while one

chooses to do this test.

Example : Customer for company A has given it a specification that the average length of the fabric has

to 150, data as collected, and the company wishes to find if the std of 150 is being met or not.

Page 13: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

13

Input Data

Page 14: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

14

Similar to 1 T Test :

Ho - µsample = 150

Ha - µsample not equal to 150

Put Std Dev

Put the Std to

compare the mean of

sample.

Page 15: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

15

As Ha is correct meaning that the sample mean is not equal to 150.

Change the Ha to greater than or less than and check the result again.

Page 16: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

16

Page 17: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

17

P value again is coming to 0.000 meaning Ha is correct meaning that the current mean is greater than

the previous mean of 150.

2.3 2 Sample T Test

This test is done when you want to compare the means of two samples.

Ho: μ1=μ2 Ha: μ1 not equal to μ2

Enter the

two

columns of

data

Page 18: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

18

Here, P>0.05, Accept the null hypothesis.

Page 19: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

19

2.4 Stacking of Data

This is the step which we do before doing the test of equal variances as the test requires the data to be

stacked in one column.

Page 20: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

20

2.5 Test for Equal Variance

This is the test which is used to compare the variances of two samples.

Ho: σ12 = σ2

2 = σ32 = …. = σn

2

Ha: Atleast one variance is different

Page 21: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

21

Page 22: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

22

Used for normal data

Used for not normal data

Page 23: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

23

2.6 1 Way Anova

This test is used for comparing the means of more than two samples.

Ho: μ1 = μ2 = μ3 = μ4 =……=μn

Ha: Atleast one mean is different

OR

Page 24: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

24

Page 25: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

25

Here, P<0.05, Reject the null hypothesis.

Page 26: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

26

2.6.1 Tukey’s Family Error Rate (Part of 1 Way Anova)

This is the test within the 1 way Anova test and is used to find out which is/are the means which are

different to other means.

The output for the same:

One-way ANOVA: Gem, Joyride, Starlite, Fantasy, Fun Source DF SS MS F P

Factor 4 2715 679 6.14 0.000

Error 52 5751 111

Total 56 8466

S = 10.52 R-Sq = 32.07% R-Sq(adj) = 26.84%

Individual 95% CIs For Mean Based on

Pooled StDev

Level N Mean StDev ------+---------+---------+---------+---

Click Comparison button

Page 27: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

27

Gem 12 44.33 3.40 (-----*-----)

Joyride 10 39.99 11.28 (------*------)

Starlite 12 29.67 14.98 (-----*-----)

Fantasy 11 43.52 8.92 (------*-----)

Fun 12 50.02 10.51 (-----*-----)

------+---------+---------+---------+---

30 40 50 60

Pooled StDev = 10.52

Tukey 95% Simultaneous Confidence Intervals

All Pairwise Comparisons

Individual confidence level = 99.34%

Gem subtracted from:

Lower Center Upper ------+---------+---------+---------+---

Joyride -17.08 -4.34 8.39 (------*-----)

Starlite -26.81 -14.67 -2.52 (-----*-----)

Fantasy -13.23 -0.82 11.60 (------*-----)

Fun -6.46 5.68 17.83 (-----*-----)

------+---------+---------+---------+---

-20 0 20 40

Joyride subtracted from:

Lower Center Upper ------+---------+---------+---------+---

Starlite -23.06 -10.32 2.41 (------*-----)

Fantasy -9.47 3.53 16.52 (------*-----)

Fun -2.71 10.03 22.76 (-----*-----)

------+---------+---------+---------+---

-20 0 20 40

Starlite subtracted from:

Lower Center Upper ------+---------+---------+---------+---

Fantasy 1.43 13.85 26.27 (-----*-----)

Fun 8.21 20.35 32.49 (-----*-----)

------+---------+---------+---------+---

-20 0 20 40

Fantasy subtracted from:

Lower Center Upper ------+---------+---------+---------+---

Fun -5.92 6.50 18.92 (-----*-----)

------+---------+---------+---------+---

-20 0 20 40

This range does not include zero, indicating that the

difference between these means is significant.

If an interval does not contain zero, there is a statistically significant difference between the

corresponding means.

If the interval does contain zero, the difference between the means is not statistically significant .

Page 28: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

28

2.7 2 Way Anova

Use the two-way analysis of variance (ANOVA) procedure to test the equality of population means when

there are two fixed factors. This procedure requires that the number of observations for each

combination of the factor levels be the same (balanced).

S, R2 and adjusted R2 are measures of how well the model fits the data. These values can help you select

the model with the best fit.

S is measured in the units of the response variable and represents the standard distance data

values fall from the fitted values. For a given study, the better the model predicts the response,

the lower S is.

R2 (R-Sq) describes the amount of variation in the observed response values that is explained by

the predictor(s). R2 always increases with additional predictors. For example, the best five-

predictor model will always have a higher R2 than the best four-predictor model. Therefore, R2 is

most useful when comparing models of the same size.

Adjusted R2 is a modified R2 that has been adjusted for the number of terms in the model. If you

include unnecessary terms, R2 can be artificially high. Unlike R2, adjusted R2 may get smaller

when you add terms to the model. Use adjusted R2 to compare models with different numbers

of predictors.

Page 29: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

29

Page 30: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

30

Page 31: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

31

Temp:

Ho: There is no effect of Temp on Time

Ha: There is effect of Temp on Time

Here, P(temp)<0.05, reject null hypothesis.

Catalyst:

Ho: There is no effect of Catalyst on Time

Ha: There is effect of Catalyst on Time

Here, P(catalyst)<0.05, reject null hypothesis.

Interaction:

Ho: There is no effect of Interaction of temp and catalyst on Time

Ha: There is effect of Interaction of temp and catalyst on Time

Here P(interaction)>0.05, accept null hypothesis.

Page 32: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

32

3.0 Test for DYCX:

3.1 Binary Logistic Regression

Binary logistic regression examines the relationship between one or more predictor variables and a

binary response. A binary response variable has two possible outcomes, such as the presence or

absence of a disease.

Screenshot for the session window only

Page 33: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

33

Here P<0.05, you conclude that there

is a significant relationship between

the response and at least one of the

predictor variables.

Page 34: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

34

4.0 DYDX

4.1 1 Proportion Test

Question: A Poll is carried out to find the acceptability of new Cricket coach by the people. 2000 people

participated and 482 people supported the new coach. It was decided that if the support rate is less

than the bare minimum of 25%, counseling would be done with the coach.

Conduct a test to check if the new coach is acceptable with 95% of confidence.

Go to STATBASIC STATISTICS1-PROPORTION

Page 35: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

35

Page 36: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

36

Hypothesis:

Ho (the null hypothesis): That the population proportion (p) is equal to the reference value Ha (the alternative hypothesis): That the population proportion is not equal to the reference value.

Here in this example:

Ho: p=0.25 Ha: p not equal to 0.25 As P value for the test is greater than the 0.05, hence accept Ho.

4.2 2 Proportion test:

Used to compare two proportions of two different populations such as, % defectives from 2 machines,

support rate for two political parties etc.

This can be found by testing the difference of two proportions.

When you use the two-proportions procedures, you are really trying to decide which of two opposing

hypotheses seem to be true, based on your sample data:

Ho (the null hypothesis): That the difference between population proportions is equal to the chosen reference value (usually zero) Ha (the alternative hypothesis): That the difference between population proportions is not equal to the chosen reference value.

Question1 – On auditing Purchase department, 7 non conformities were found out of 155 check points

and hen sales department was audited, 9 non conformities were found out of 200 check points. Find

with 95% of confidence if the two proportions are different. Also calculate the confidence interval for

difference in non conformities.

Hypothesis

Ho : p1=p2

Ha: p1 not equal to p2

Go to STATBASIC STATISTICS2-PROPORTIONS

Page 37: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

37

Page 38: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

38

Here in this case P>0.05, than accept Ho.

4.3 Chi Square Test:

Page 39: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

39

Page 40: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

40

Page 41: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

41

Hypothesis:

Ho: the variables are not associated. Ha: the variables are associated. Use Chi-Square Test to determine the p-value. Use the p-value to decide whether the variables are associated or not: If the p-value is less than or equal to your chosen a-level then you can conclude that the variables are associated. If the p-value is greater than your chosen a-level then you cannot conclude that the variables are associated.

Here, P>0.05, accept Ho.

Page 42: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

42

Page 43: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

43

Page 44: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

44

The chi-square goodness-of-fit test evaluates these hypotheses:

Ho: Data follow a multinomial distribution with certain proportions Ha: Data do not follow a multinomial distribution with certain proportions

Page 45: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

45

NON PARAMETRIC TESTS

1-Sample Sign Test :

Page 46: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

46

1 Sign Test is very similar to the One T Test, just that instead of comparing sample mean to standard the

1 Sign test compares median of the sample to a standard.

Ho- Median of sample equal to Standard.

Ha- Median of sample not equal to standard

Here we have taken the

Standard of 40

Page 47: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

47

Mann Whitney:

Assumptions:

Samples are randomly drawn whose distributions have the same shape and whose variances are equal

The two random samples are independent The Mann-Whitney test is a nonparametric alternative to the two-sample t test with pooled sample

variances.

Hypotheses:

Ho (null hypothesis) - the two population medians are equal Ha (alternative hypothesis) - the two population medians are not equal.

Page 48: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

48

Page 49: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

49

Moods Median Test:

We can use the Mood's median test (also called a median test or sign scores test) to make inferences

about the equality of medians for two or more populations based on data from independent, random

samples.

Page 50: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

50

Mood's median test is robust against outliers and errors in data and is particularly appropriate in the

preliminary stages of analysis. Mood's median test is more robust than is the Kruskal-Wallis test against

outliers, but is less powerful for data from many distributions, including the normal.

Hypothesis:

Ho: The median for all the samples are significantly equal Ha: Atleast one median is significantly different as compared with others. Here, P>0.05, Ho is accepted.

Page 51: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

51

Kruskal-Wallis Test

The Kruskal-Wallis test is used to make inferences about the equality of medians for two or more

populations based on data from independent, random samples.

Page 52: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

52

Page 53: Hypothesis test procedure In Minitab

HYPOTHESIS TEST PROCEDURE

AIG Confidential & Proprietary

53

N - Number of observations for each level of the factor.

Overall - Total number of observations

Median - Median of the observations for each level, which provides an estimate of the population medians for each level

Ave Rank - Statistic that ranks the levels of data and is used to determine the Kruskal-Wallis statistic

The hypotheses are:

Ho: No difference exists in the populations medians

Ha: A difference exists between at least two population medians

Here, P<0.05, Hence reject Ho.