PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical...

31
PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations Chapters 9 and 10 MSIS 111 Prof. Nick Dedeke

Transcript of PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical...

Page 1: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University

Statistical Inference: Hypotheses testing for single and two populations

Chapters 9 and 10

MSIS 111 Prof. Nick Dedeke

Page 2: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Test hypotheses for one population mean using the Z statistic.Test hypotheses and construct confidence intervals about the difference in two population means using the Z statistic.Test hypotheses and construct confidence intervals about the difference in two related populations.

Learning Objectives

Page 3: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

A research hypothesis is a statement about what the researcher believes will be the outcome of an experiment or study. To prove a research hypothesis a

statistical hypothesisstatistical hypothesis is formulated and tested.

Definition of Hypothesis

Page 4: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

A statistical hypothesis uses the following logic. It assumes that a condition holds (Null hypothesis, Ho) and attempts to use statistical procedures to show that the condition is supported by data as being more likely to be valid than not. If the null hypothesis is rejected, the alternate hypothesis (Ha) is accepted without testing.

Definition of Statistical Hypothesis Testing

Page 5: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

The research hypothesis: Has the weight of our product changed? Statistical hypothesis to test:

Example Statistical Hypothesis Testing (Two-tailed Tests)

1

1

0: 40 .: 40 .a

H ozH oz

Page 6: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

The research hypothesis: Are the groceries prices in department stores higher than in pharmacies? Statistical hypothesis to test:

Example Statistical Hypothesis Testing (One-tailed Tests)

1

1

0: 10_: 10_ .a

H dollarsH dollars

1

1

0: 10_: 10_ .a

H dollarsH dollars

Page 7: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Reject and Nonreject Regions

X

Accept region

Reject region

40 ounces

Critical values

Reject region

Experiment: We take a sample of 100 units from the populationand calculate the average of the weight of the products. We get a value of 40.3. Though this value is not = 40, we will accept the H0 that the population has a mean = 40, if the sample average value falls in the accept region.

Page 8: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Type 1 and Type 2 Errors

Reject

null

Null true Null false

Probability of committing Type 1 error is . Probability of committing Type 1 error is .

Fail to reject

Correctdecision

Correctdecision

Type Ierror (

Type IIerror (

Null hypothesis is true but we reject it.

Null hypothesis is false but we accept it.

Page 9: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Example: Determining the Reject and Nonreject Regions

Accept region

Reject region

40 ounces

Critical values

Reject region

If we set alpha () to be 0.05. The critical values will be at /2 = 0.025. This means that the from the normal table we find the z value that corresponds to (0.5-0.025) =0.475 This is z = 1.96

2

Z2

Z

Page 10: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Exercise: Determining the Reject and Nonreject Regions

Accept region

Reject region

40 ounces

Critical values

Reject region

If we set alpha () to be 0.10. Find the z values for the critical value.

2

Z2

Z

Page 11: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Response: Determining the Reject and Nonreject Regions

Accept region

Reject region

40 ounces

Critical values

Reject region

2

Z2

Z

If we set alpha () to be 0.10. The critical values will be at /2 = 0.05. This means that the from the normal table we find the z value that corresponds to (0.5-0.05) =0.45 This is z = 1.64

Page 12: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Example

( ) (40.6 40) 0.61.06

0.566450

xz

n

Is the weight of the units of a product different from 40 oz.? Standard deviation is 4. We want probability of Type 1 error alpha = 0.05; n = 50; oz; x = 40.6 oz.

1

1

0: 40 .: 40 .a

H ozH oz

Steps:1. Determine the critical values. Z critical = =/- 1.96 2. Calculate the z value.3. Identify the location of the z value in normal graph. Z is less thancritical z, so we accept null hypothesis!

Page 13: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Response: Graph

Accept region

Z = 1.06

40 ounces

Critical values

Reject region

If we set alpha () to be 0.05. The critical values will be at /2 = 0.025. This means that the from the normal table we find the z value that corresponds to (0.5-0.025) =0.475 This is z critical = 1.96z= 1.06 will be in the accept zone.

2

1.96Z 2

1.96Z

Page 14: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Exercise

( )xz

n

Is the salary of CPA’s different from $74,914?Standard deviation is $14,530. We want probability of Type 1 error to be alpha =0.05; n = 212; mean derived from sample is $78,695. Should we accept the null hypothesis?

1

1

0: $74,914: $74,914a

HH

Page 15: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Exercise(One sided hypothesis)The historical mean rating for mangers is 4.30. A survey of 32 mangers yielded a mean of 4.156. Is this mean less than the historical value? Standard deviation is 0.574. We want probability of Type 1 error to be alpha =0.05; Should we accept the null hypothesis?

1

1

0: 4.30: 4.30a

HH

( )xz

n

Notice in this case, we have one-sided case,so the reject zone is on the left side. So, we will use alpha = 0.05 to discover thecritical value = 0.5 – 0.05 =0.45From the table z critical = -1.645Entering values into equation yields z = -1.42 (try this on your own)z critical is less than –1.42 so we accept null hypothesis.

Page 16: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Two Populations: Inferences

Up till now we considered cases in which one took a single sample and we use it to test a hypothesis. Often, one needs to compare two different samples. The hypothesis of interest are:Are the samples different?Is one sample less than or greater than the other?

Page 17: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Two Populations: Inferences

Experiment: Select two independent samples calculate the sample means for each of them. Use the differences between the sample means to test the hypothesis that both of the populations are different.The process is the same, however the equations for deriving z values is now different. We also need samples that exceed 30 items to benefit from the central limit theorem.

Page 18: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Sampling Distribution of the Difference Between Two Sample Means

nxx

11

Population 1

Population 2

nxx

22

1X

2X

1x

2x

21xx

21xx

Page 19: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Sampling Distribution of the Difference between Two Sample Means

1 2X X1 2X X

1 2

1

2

1

2

2

2X X n n

1 21 2X X

Page 20: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Z Formula for the Difference in Two Sample Means

nn

xxz

2

2

2

1

2

1

2121

When 12 and2

2 are known and the two

samples are independent Samples

Page 21: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Hypothesis Testing for Differences Between Means: The Salary Example

Advertising Managers

74.256 57.791 71.115

96.234 65.145 67.574

89.807 96.767 59.621

93.261 77.242 62.483

103.030 67.056 69.319

74.195 64.276 35.394

75.932 74.194 86.741

80.742 65.360 57.351

39.672 73.904

45.652 54.270

93.083 59.045

63.384 68.508

164.264

253.16

700.70

32

2

1

1

1

1

xn

411.166

900.12

187.62

34

2

2

2

2

2

xn

Auditing Managers

69.962 77.136 43.649

55.052 66.035 63.369

57.828 54.335 59.676

63.362 42.494 54.449

37.194 83.849 46.394

99.198 67.160 71.804

61.254 37.386 72.401

73.065 59.505 56.470

48.036 72.790 67.814

60.053 71.351 71.492

66.359 58.653

61.261 63.508

Random sample of 32 advertising and 34 auditing managerswas taken. The sample statistics are given below. Is there a difference between the sample means?

Page 22: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Hypothesis Testing for Differences Between Means: The Salary Example

21

21

::0

aHH

=0.05, /2 = 0.025, z0.025 = 1.96

Hypothesis: Are the salaries in the two functions different.

1 2

1 2

0 0:: 0a

HH

The better way to perform a hypothesis for two populations is to use the difference of the means as the null hypothesis.

Page 23: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Hypothesis Testing for Differences Between Means: The Salary Example

35.2

34

411.166

32

160.264)0()187.62700.70(

z

Since the observed value of 2.35 is greater than 1.96, reject the null hypothesis. That is, there is a significant difference between the average annual wage of advertisingmanagers and the average annual wage of an auditing manager.

nn

xxz

2

2

2

1

2

1

2121

164.264

253.16

700.70

32

2

1

1

1

1

xn

411.166

900.12

187.62

34

2

2

2

2

2

xn

Page 24: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Exercise: Hypothesis Testing for Differences Between Means (Two sided)

nn

xxz

2

2

2

1

2

1

2121

1

1

1

2

1

82

$3352

$1100

$1210,000

nx

2

2

2

2

2

76

$4080

$1700

$2890,000

nx

Two independent samples are to be compared.Use Alpa = 0.1% (0.001);

1 2

1 2

0 0:: 0a

HH

Page 25: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Exercise: Hypothesis Testing for Differences Between Means (One sided)

nn

xxz

2

2

2

1

2

1

2121

1

1

1

2

1

82

$3352

$1100

$1210,000

nx

2

2

2

2

2

76

$4080

$1700

$2890,000

nx

Use Alpa = 1% (0.001); z critical = +/- ????

1 2

1 2

0 0:: 0a

HH

Page 26: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Confidence Interval to Estimate 1 - 2 When 1, 2 are known

nn

zxxnnzxx

2

2

2

1

2

12121

2

2

2

1

2

121

By how much are the means different??

Page 27: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Demonstration Problem 10.2

88.142.4

5099.2 2

5046.396.16.2445.21

505096.16.2445.21

21

2

21

22

2

2

2

1

2

12121

2

2

2

1

2

121

99.246.3

nnxxnnxx zz

46.3

45.21

50

1

1

1

x

n

Regular

99.2

6.24

50

2

2

2

x

n

Premium

1.96 = Confidence %95 z

Page 28: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

EXCEL Output for HernandezNew-Employee Training Problem

t-Test: Two-Sample Assuming Equal Variances

Variable 1 Variable 2Mean 4 7.73 56.5Variance 19.495 18.27Observations 15 12Pooled Variance 18.957Hypothesized Mean Difference 0df 25t Stat - 5.20P(T<=t) one-tail 1.12E-05t Critical one-tail 1.71P(T<=t) two-tail 2.23E-05t Critical two-tail 2.06

Page 29: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Dependent Samples

Before and after measurements on the same individualStudies of twinsStudies of spouses

Individual

1

2

3

4

5

6

7

Before

32

11

21

17

30

38

14

After

39

15

35

13

41

39

22

Page 30: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Formulas for Dependent Samples

difference samplemean =

difference sample ofdeviation standard =

difference populationmean =

pairsin difference sample =

pairs ofnumber

1

d

s

D

d

n

ndfn

sDd

t

t

d

1

)(

1

)(

22

2

nnd

d

n

dds

n

dd

d

Page 31: PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.

Sheet Metal Example-EXCEL Solution