Single sample z test - explain (final)

55
Single-Sample Z Test Theoretical Explanation

description

How to perform a Single Sample Z Test.

Transcript of Single sample z test - explain (final)

Page 1: Single sample z test - explain (final)

Single-Sample Z TestTheoretical Explanation

Page 2: Single sample z test - explain (final)

A one-sample Z-test for proportions is a test that helps us compare a population proportion with a sample proportion.

Page 3: Single sample z test - explain (final)

A one-sample Z-test for proportions is a test that helps us compare a population proportion with a sample proportion.

Sample Population

30% 32%

Page 4: Single sample z test - explain (final)

A one-sample Z-test for proportions is a test that helps us compare a population proportion with a sample proportion.

Here is our question: Are the population and the sample proportions (which supposedly have the same general characteristics as the population) statistically significantly the same or different?

Sample Population30% 32%

Page 5: Single sample z test - explain (final)

Consider the following example:

Page 6: Single sample z test - explain (final)

Consider the following example:A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82 indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Page 7: Single sample z test - explain (final)

Consider the following example:

Which is the sample?

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82 indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Page 8: Single sample z test - explain (final)

Consider the following example:

Which is the sample? What is the population?

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82 indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Page 9: Single sample z test - explain (final)

Consider the following example:

Which is the sample? What is the population?The sample proportion is .82 – 82 out of doctors recommend aspirin.

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82 indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Page 10: Single sample z test - explain (final)

Consider the following example:

Which is the sample? What is the population?The sample proportion is .82 – 82 out of doctors recommend aspirin.The population proportion .90 (the claim that 9 out of 10 doctors recommend aspirin).

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82 indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Page 11: Single sample z test - explain (final)

We begin by stating the null hypothesis:

Page 12: Single sample z test - explain (final)

We begin by stating the null hypothesis:

The alternative hypothesis would be:

The proportion of a sample of 100 medical doctors who recommend aspirin for their patients with headaches IS NOT statistically significantly different from the claim that 9 out of 10 doctors recommend aspirin for their patients with headaches.

Page 13: Single sample z test - explain (final)

We begin by stating the null hypothesis:

The alternative hypothesis would be:

The proportion of a sample of 100 medical doctors who recommend aspirin for their patients with headaches IS NOT statistically significantly different from the claim that 9 out of 10 doctors recommend aspirin for their patients with headaches.

The proportion of a sample of 100 medical doctors who recommend aspirin for their patients with headaches IS statistically significantly different from the claim that 9 out of 10 doctors recommend aspirin for their patients with headaches.

Page 14: Single sample z test - explain (final)

State the decision rule: We will calculate what is called the z statistic which will make it possible to determine the likelihood that the sample proportion (.82) is a rare or common occurrence with reference to the population proportion (.90).

Page 15: Single sample z test - explain (final)

State the decision rule: We will calculate what is called the z statistic which will make it possible to determine the likelihood that the sample proportion (.82) is a rare or common occurrence with reference to the population proportion (.90).

If the z-statistic falls outside of the 95% common occurrences and into the 5% rare occurrences then we will conclude that it is a rare event and that the sample is different from the population and therefore reject the null hypothesis.

Page 16: Single sample z test - explain (final)

Before we calculate this z-statistic, we must locate the z critical values.

Page 17: Single sample z test - explain (final)

Before we calculate this z-statistic, we must locate the z critical values.

What are the z critical values? These are the values that demarcate what is the rare and the common occurrence.

Page 18: Single sample z test - explain (final)

Let’s look at the normal distribution:

It has some important properties that make it possible for us to locate the z statistic and compare them to the z criticals.

Page 19: Single sample z test - explain (final)

Here is the mean and the median of a normal distribution.

Page 20: Single sample z test - explain (final)

50% of the values are above and below the orange line.

50% - 50% +

Page 21: Single sample z test - explain (final)

68% of the values fall between +1 and -1 standard deviations from the mean.

34% - 34% +

Page 22: Single sample z test - explain (final)

68% of the values fall between +1 and -1 standard deviations from the mean.

34% - 34% +

68%

mean-1σ +1σ

Page 23: Single sample z test - explain (final)

68% of the values fall between +1 and -1 standard deviations from the mean.

34% - 34% +

95%

mean-1σ +1σ-2σ +2σ

Page 24: Single sample z test - explain (final)

Since our decision rule is .05 alpha, this means that if the z value falls outside of the 95% common occurrences we will consider it a rare occurrence.

34% - 34% +

95%

mean-1σ +1σ-2σ +2σ

Page 25: Single sample z test - explain (final)

Since are decision rule is .05 alpha we will see if the z statistic is rare using this visual

95%

mean-1σ +1σ-2σ +2σ

2.5% 2.5%

rarerare

Page 26: Single sample z test - explain (final)

Or common

95%

mean-1σ +1σ-2σ +2σ

Common

Page 27: Single sample z test - explain (final)

Before we can calculate the z – statistic to see if it is rare or common we first must determine the z critical values that are associated with -2σ and +2σ.

95%

mean-1σ +1σ-2σ +2σ

Common

Page 28: Single sample z test - explain (final)

We look these up in the Z table and find that they are -1.96 and +1.96

95%

mean-1σ +1σ-2σ +2σ

Common

-1.96 +1.96Z values

Page 29: Single sample z test - explain (final)

So if the z statistic we calculate is less than -1.96 or greater than +1.96 then we will consider this to be rare and reject the null hypothesis and state that there is statistically significant difference between .9 (population) and .82 (the sample).

Page 30: Single sample z test - explain (final)

So if the z statistic we calculate is less than -1.96 or greater than +1.96 then we will consider this to be rare and reject the null hypothesis and state that there is statistically significant difference between .9 (population) and .82 (the sample).

Let’s calculate the z statistic and see where if falls!

Page 31: Single sample z test - explain (final)

So if the z statistic we calculate is less than -1.96 or greater than +1.96 then we will consider this to be rare and reject the null hypothesis and state that there is statistically significant difference between .9 (population) and .82 (the sample).

Let’s calculate the z statistic and see where if falls!

We do this by using the following equation:

Page 32: Single sample z test - explain (final)

So if the z statistic we calculate is less than -1.96 or greater than +1.96 then we will consider this to be rare and reject the null hypothesis and state that there is statistically significant difference between .9 (population) and .82 (the sample).

Let’s calculate the z statistic and see where if falls!

We do this by using the following equation:

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=�̂�−𝑝

√𝑝 (1−𝑝)𝑛

Page 33: Single sample z test - explain (final)

So if the z statistic we calculate is less than -1.96 or greater than +1.96 then we will consider this to be rare and reject the null hypothesis and state that there is statistically significant difference between .9 (population) and .82 (the sample).

Let’s calculate the z statistic and see where if falls!

We do this by using the following equation:

Zstatistic is what we are trying to find to see if it is outside or inside the z critical values (-1.96 and +1.96).

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=�̂�−𝑝

√𝑝 (1−𝑝)𝑛

Page 34: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=�̂�−𝑝

√𝑝 (1−𝑝)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Page 35: Single sample z test - explain (final)

(.90)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=�̂�−𝑝

√𝑝 (1−𝑝)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Page 36: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=�̂�−𝑝

√𝑝 (1−𝑝)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

(100)

Page 37: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=�̂�−𝑝

√𝑝 (1−𝑝)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Let’s plug in the numbers

Page 38: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=.82−𝑝

√𝑝 (1−𝑝)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Sample Proportion

Page 39: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=.82− .90

√ .90(1− .90)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Population Proportion

Page 40: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=− .08

√ .90(1− .90)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

The difference

Page 41: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=− .08

√ .90(1− .90)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Now for the denominator which is the estimated standard error. This value will help us know how many standard error units .82 and .90 are apart from one another.

Page 42: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=− .08

√ .90(1− .90)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

If the standard error is small then the z statistic will be larger. If it exceeds the -1.96 or +1.96 boundaries, then we will reject the null hypothesis. If it is smaller than we will not.

Page 43: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=− .08

√ .90(1− .90)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Let’s continue our calculations and find out:

Page 44: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=− .08

√ .90( .10)𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Let’s continue our calculations and find out:

Page 45: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=− .08

√ .09𝑛

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Let’s continue our calculations and find out:

Page 46: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=− .08

√ .09100

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Sample Size:

Page 47: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=− .08

√.0009

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Let‘s continue our calculations:

Page 48: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=− .08.03

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Let‘s continue our calculations:

Page 49: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=−2.67

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Let‘s continue our calculations:

Page 50: Single sample z test - explain (final)

𝒛 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄=−2.67

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82

indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05

Let‘s continue our calculations:

Now we have our z statistic.

Page 51: Single sample z test - explain (final)

Let’s go back to our distribution:

rarerare

95%

mean-1σ +1σ-2σ +2σ

Common

-1.96 +1.96

Page 52: Single sample z test - explain (final)

Let’s go back to our distribution: So, is this result rare or common?

rarerare

95%

mean-1σ +1σ-2σ +2σ

Common

-1.96 +1.96-2.67

Page 53: Single sample z test - explain (final)

Let’s go back to our distribution: So, is this result rare or common?

rarerare

95%

mean-1σ +1σ-2σ +2σ

Common

-1.96 +1.96-2.67

Page 54: Single sample z test - explain (final)

Looks like it is a rare event therefore we will reject the null hypothesis in favor of the alternative hypothesis:

Page 55: Single sample z test - explain (final)

Looks like it is a rare event therefore we will reject the null hypothesis in favor of the alternative hypothesis:

The proportion of a sample of 100 medical doctors who recommend aspirin for their patients with headaches IS statistically significantly different from the claim that 9 out of 10 doctors recommend aspirin for their patients with headaches.