+ All Categories
Home > Documents > Lecture Z Test

Lecture Z Test

Date post: 12-May-2017
Category:
Upload: paulmendoza04
View: 217 times
Download: 0 times
Share this document with a friend
31
Overview of Statistical Hypothesis Testing Definitions • There are many different hypothesis testing procedures, using one versus another will be based on the exact situation we find ourselves in. • Today we will learn the z-test. – The appropriate parametric statistical procedure when there is one sample that is being compared to a population with a known mean () and standard deviation ().
Transcript
Page 1: Lecture Z Test

Overview of Statistical Hypothesis TestingDefinitions

• There are many different hypothesis testing procedures, using one versus another will be based on the exact situation we find ourselves in.

• Today we will learn the z-test.– The appropriate parametric statistical

procedure when there is one sample that is being compared to a population with a known mean () and standard deviation ().

Page 2: Lecture Z Test

Overview of Statistical Hypothesis Testing

• Hypothesis testing is an inferential statistical procedure that takes information from a sample to evaluate hypotheses about a population.

• Hypothesis testing usually begins with a population with an unknown mean. Often, in hypothesis testing, a treatment is added to a population with a known mean which changes the mean in some unknown way.– If an effect occurs, it is to add or subtract a constant

to the mean.– As an example, perhaps we know the mean GRE

score, however, we implement a class that is thought to change GRE scores. The population of GRE scores has a known mean, however the mean of the population of scores after the implementation of the class is unknown.

Page 3: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

Hypothesis testing involves a seven step procedure:

1. Stating the hypotheses2. Determine the measurement level3. Choose the statistical test4. Specify a significance level and sample size 5 Compute the statistical test6. Determine the significance of the computed

value 7. Interpret and discuss the result

Page 4: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

Step 1

• 1. Stating the Hypotheses• There are always two hypotheses formed when doing

hypothesis testing. They are called the null and alternative hypotheses.

• The null hypothesis (H0) states that nothing occurs. Implementing a treatment does not change people’s scores. No difference between the means of the treated and untreated populations.

• The alternative hypothesis (Ha) states that the treatment does have an effect. Implementing a treatment does change people’s scores. The mean of the treated population is different from the mean of the untreated population.

Page 5: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

Step 1

• 1. Stating the Hypotheses• In numerical terms:

– H0: treated = untreated

– Ha: treated ≠ untreated

• Together, these two hypotheses must account for every possible thing that could occur. In this case, either the means are equal or they are not equal. Every possible outcome is covered.

Page 6: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

Step 1• 1. Stating the Hypotheses• Hypotheses can be directional or

nondirectional.• The hypotheses we’ve just written are

nondirectional in that they don’t predict what the treatment is going to do, increase or decrease performance. These hypotheses will simply test whether the treated and untreated means are different.

• If you have a reason to believe what effect the treatment is going to have, you should use directional hypotheses.

Page 7: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

Step 1

• For example, you’ve created a class that you think will improve GRE scores. Your hypotheses will then read:

– H0: treated ≤ untreated

– Ha: treated > untreated

• The null covers the possibilities that either nothing happened, or the opposite of what I expected happened.

• Together these hypotheses cover every possible outcome that could occur.

Page 8: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

Step 2• The level of measurement of your

variable determine to a large extent the statistical test you will use to test hypothesis.

• Parametric statistical test are generally use for interval and ratio level of measurement, while non parametric test are usually applied to nominal and ordinal types

Page 9: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

Step 3

• Choose the statistical test appropriate to the test hypothesis

• Z test – normally large data• T test – normally few data

Page 10: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

Step 4• 4. Specify a significance level and the sample size• Before we can discuss setting a criteria for decision

we need to review a little bit.• Remember, the shape of the distribution of sample

means depends on the of the original population as well as the sample size (n).

• Our basic job with hypothesis testing is to look at the original distribution of sample means, and then determine if the treated sample comes from the original distribution of sample means or if it comes from a different distribution of sample means.

Page 11: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

• Setting the Criteria for a Decision• Our job when setting the criteria for decisions is to

determine what we feel is a “very low probability”.• This “Very low probability” is called and is often set

at .05 or .01 by convention. – For problems given in the text or on tests, is given to you.

• Stated in words, if the probability of obtaining a sample mean from the original distribution of sample means is less than , then we will conclude that the sample came from a different distribution of sample means.

is also known as the region of rejection. That is, if our sample mean falls in this region, we will reject the null hypothesis which states that there is no difference between the means of the treated and untreated population.

Page 12: Lecture Z Test

A sampling distribution for H0 showing the region of rejection for = .05 in a 2-tailed z-test.

Page 13: Lecture Z Test

1-tailed region, above mean

A sampling distribution for H0 showing the region of rejection for = .05 in a 1-tailed z-test.

Page 14: Lecture Z Test

1-tailed region, below mean

A sampling distribution for H0 showing the region of rejection for = .05 in a 1-tailed z-test where a

decrease in the mean is predicted.

Page 15: Lecture Z Test
Page 16: Lecture Z Test

Overview of Statistical Hypothesis TestingFour Steps

Step 5

• 5. Compute the value of the statistical test. • At this stage of hypothesis testing we must decide

what z-scores correspond to this region of rejection.• Pretend that we were working on the GRE score

problem. We want to know the z-scores associated with an unlikely outcome. If we were told that = .05, then we would need to find the z-score beyond which 5% of the distribution lies. Looking in Table B.1, we find that at a z-score of +1.65, 5% of the scores fall in the tail.

• If we had been told that = .01, then a z-score of +2.33 would be needed.

Page 17: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

• 6. Setting the Criteria for a Decision• If we were using nondirectional hypotheses, we would

need to split the region of rejection into both tails. That is, when using nondirectional hypotheses, an extreme sample mean in either direction would be important.

• If we were using nondirectional hypotheses, and was set at .05, then we would have two critical z-score values. If the z-score from the sample was greater than 1.96 or less than -1.96 then it would fall into the most extreme 5%, 2.5% in each end.

• Likewise, if =.01 for nondirectional hypotheses, then the critical z-scores would be +2.58 and -2.58, these separate the most extreme 1%, ½ % in each tail.

Page 18: Lecture Z Test

Overview of Statistical Hypothesis TestingSeven Steps

Step 7

• 7. Evaluating the Null Hypothesis (H0)• Using the information we have, we will evaluate the

merits of our hypotheses. • Does the z-score from the treated sample fall in the

region of rejection.– If so, then we would reject H0 and conclude that the

treatment did have an effect. – If not, then we would fail to reject H0 and conclude

that the evidence does not support the idea that the treatment had an effect.

Page 19: Lecture Z Test

If P < 0.05, the observed difference is‘SIGNIFICANT (Statistically)’

P< 0.01, sometimes termed as ‘Highly Significant’

Page 20: Lecture Z Test

INTERPRETATION OF SIGNIFICANCEINTERPRETATION OF SIGNIFICANCE

SIGNIFICANT Does not necessarily mean that the

observed difference is REAL or

IMPORTANT. Only that it is unlikely

(< 5%) to be due to chance.

Page 21: Lecture Z Test

INTERPRETATION OF NON - SIGNIFICANCEINTERPRETATION OF NON - SIGNIFICANCE

NON - SIGNIFICANT Does not necessarily mean that there is no real difference; it means only that the observed difference could easily be due to chance

(Probability of at least 5%)

Page 22: Lecture Z Test

Determine The Hypothesis:Whether There is an Association or

Not

• Write down the NULL HYPOTHESIS and ALTERNATIVE HYPOTHESIS and set the LEVEL OF SIGNIFICANCE.

• Ho : The two variables are independent

• Ha : The two variables are associated• We will set the level of significance at

0.05.

Page 23: Lecture Z Test

For Example• Some null hypotheses may be:

– ‘there is no relationship between the height of the land and the vegetation cover’.

– ‘there is no difference in the location of superstores and small grocers shops’

– ‘there is no connection between the size of farm and the type of farm’

Page 24: Lecture Z Test

Statistical Hypothesis Testingz-test Example

• I am a dog food manufacturer, I have created new Super Vitamin Enriched Puppy Chow, specially designed for the active and growing Doberman Pincer. I want to run a commercial advertising the effectiveness of my food.

• I know that the average weight () of adult Dobermans is 35.8 kg ( = 6.2 kg)

• I took a sample of 10 Doberman puppies and fed them nothing but my Super Vitamin Enriched Puppy Chow. When these dogs reached adulthood, they weighed 39.7 kg on average (M).

• Did my Puppy Chow make them grow especially big, test with = .05?

Page 25: Lecture Z Test

Statistical Hypothesis Testingz-test Example

Step 1State the Hypotheses

• H0: The puppy chow did not make the dogs grow any more than normal.

• Ha: The puppy chow did make the dogs grow larger then normal

• H0: chow ≤ all

• Ha: chow > all

• Notice that this is a one-tailed test, I predict that the Chow will make the dogs grow, not shrink.

Page 26: Lecture Z Test

• A “very unlikely sample” in this case is one which occurs less than 5% of the time by random chance.

• Looking in Table 1, we find that the z-score which sets off the top 5% of the distribution is 1.645.

• Therefore, zcrit = +1.645• This value defines my region of rejection.• If my zobt falls anywhere in this region of rejection, then

we will reject H0.

Statistical Hypothesis Testingz-test Example

Step 2Setting the Criteria for Decision

Page 27: Lecture Z Test

Statistical Hypothesis Testingz-test Example

Step 3Collecting Sample Data

961.1102.6

nX

99.1961.1

8.357.39

Xobt

Xz

Page 28: Lecture Z Test

• zobt > zcrit

• The zobt falls in the region of rejection.

• We will reject H0 and conclude that the Super Vitamin Enriched Puppy Chow makes Doberman Pincers grow significantly larger.

• I can safely go ahead with my advertising campaign!

Statistical Hypothesis Testingz-test Example

Step 4Evaluating the Null Hypothesis

Page 29: Lecture Z Test

Hypothesis Testing Large Samples

1. A random sample of 100 people in the city revealed that tennis is played, on the average, 1.2 hours per week during the summer. The population standard deviation is .4 hours for all people in the United States. Test whether this sample indicates that the number of hours tennis is played in this city differs from the national average of 1.1 hours. Use =.01.

1. HO : 1.1 HA : 1.1

2. Two tail z test n > 30 known

3. .495 .495

.005 .005

2.57 -2.57

4. z x SE

1.2 1.1

.4100

2.5 5. Fail to reject, there is not enough evidence at the .01 level to show that the average hours are different.

Page 30: Lecture Z Test

Hypothesis Testing Large Samples

2. The population of all minority workers has a mean wage of $14,500 with a standard deviation of $200.00. Test whether a sample of 100 having an average of $14,300 and = .05 differs from the population average.

1. HO : $14,500 HA : $14,500

2. Two tail z test n > 30 known

3. .475 .475

.025 .025

1.96 -1.96

4. z x SE

14,300 14,500

200100

10 5. Reject HO at the .05 level. There is evidence that the salaries are different.

Page 31: Lecture Z Test

Hypothesis Testing Large Samples

3. A new bus route has been established. For the old route, the average waiting time was 18.3 minutes. However, a random sample of 40 waiting times between buses using the new route had a mean of 15.1 minutes with a sample standard deviation of 6.2 minutes. Does this indicate that the new route is different from the old route? Use = .05.

1. HO : 18.3 HA : 18.3

2. Two tail z test n > 30

3. .475 .475

.025 .025

1.96 -1.96

4. z x SE

15.1 18.3

6.240

3.27 5. Reject HO at the .05 level. There is evidence that the new route is different.


Recommended