Вы находитесь на странице: 1из 8

1

Hypothesis Testing

Definitions

Null Hypothesis ( H0 )
Statement of zero or no change. If the original claim includes equality (<=, =, or >=), it is the null
hypothesis. If the original claim does not include equality (<, not equal, >) then the null hypothesis is
the complement of the original claim. The null hypothesis always includes the equal sign. The
decision is based on the null hypothesis.
Alternative Hypothesis ( H1 or Ha )
Statement which is true if the null hypothesis is false. The type of test (left, right, or two-tail) is based
on the alternative hypothesis.
Type I error
Rejecting the null hypothesis when it is true (saying false when true). Usually the more serious error.
Type II error
Failing to reject the null hypothesis when it is false (saying true when false).
alpha
Probability of committing a Type I error.
beta
Probability of committing a Type II error.
Test statistic
Sample statistic used to decide whether to reject or fail to reject the null hypothesis.
Critical region
Set of all values which would cause us to reject H0
Critical value(s)
The value(s) which separate the critical region from the non-critical region. The critical values are
determined independently of the sample statistics.
Significance level ( alpha )
The probability of rejecting the null hypothesis when it is true. alpha = 0.05 and alpha = 0.01 are
common. If no level of significance is given, use alpha = 0.05. The level of significance is the
complement of the level of confidence in estimation.
Decision
A statement based upon the null hypothesis. It is either "reject the null hypothesis" or "fail to reject
the null hypothesis". We will never accept the null hypothesis.
Conclusion
A statement which indicates the level of evidence (sufficient or insufficient), at what level of
significance, and whether the original claim is rejected (null) or supported (alternative).

Introduction

Be sure to read through the definitions for this section before trying to make sense out of the following.

The first thing to do when given a claim is to write the claim mathematically (if possible), and decide
whether the given claim is the null or alternative hypothesis. If the given claim contains equality, or a
statement of no change from the given or accepted condition, then it is the null hypothesis, otherwise, if it
represents change, it is the alternative hypothesis.

The following example is not a mathematical example, but may help introduce the concept.
2
Example

"He's dead, Jim," said Dr. McCoy to Captain Kirk.

Mr. Spock, as the science officer, is put in charge of statistically determining the correctness of Bones'
statement and deciding the fate of the crew member (to vaporize or try to revive)

His first step is to arrive at the hypothesis to be tested.

Does the statement represent a change in previous condition?

 Yes, there is change, thus it is the alternative hypothesis, H1


 No, there is no change, therefore is the null hypothesis, H0

The correct answer is that there is change. Dead represents a change from the accepted state of alive. The
null hypothesis always represents no change. Therefore, the hypotheses are:

 H0 : Patient is alive.
 H1 : Patient is not alive (dead).

States of nature are something that you, as a statistician have no control over. Either it is, or it isn't. This
represents the true nature of things.

Possible states of nature (Based on H0)

 Patient is alive (H0 true - H1 false )


 Patient is dead (H0 false - H1 true)

Decisions are something that you have control over. You may make a correct decision or an incorrect
decision. It depends on the state of nature as to whether your decision is correct or in error.

Possible decisions (Based on H0 ) / conclusions (Based on claim )

 Reject H0 / "Sufficient evidence to say patient is dead"


 Fail to Reject H0 / "Insufficient evidence to say patient is dead"

There are four possibilities that can occur based on the two possible states of nature and the two decisions
which we can make.

Statisticians will never accept the null hypothesis, we will fail to reject. In other words, we'll say that it isn't,
or that we don't have enough evidence to say that it isn't, but we'll never say that it is, because someone else
might come along with another sample which shows that it isn't and we don't want to be wrong.

Statistically (double) speaking ...

State of Nature
Decision H0 True H0 False
Reject H0 Patient is alive, Patient is dead,
3

Sufficient evidence of death Sufficient evidence of death


Fail to reject H0 Patient is alive, Patient is dead,

Insufficient evidence of death Insufficient evidence of death

In English ...

State of Nature
Decision H0 True H0 False
Reject H0 Vaporize a live person Vaporize a dead person
Fail to reject H0 Try to revive a live person Try to revive a dead person

Were you right ? ...

State of Nature
Decision H0 True H0 False
Reject H0 Type I Error Correct Assessment
alpha
Fail to reject H0 Correct Assessment Type II Error
beta

Which of the two errors is more serious? Type I or Type II ?

Since Type I is the more serious error (usually), that is the one we concentrate on. We usually pick alpha to
be very small (0.05, 0.01). Note: alpha is not a Type I error. Alpha is the probability of committing a Type I
error. Likewise beta is the probability of committing a Type II error.

Conclusions

Conclusions are sentence answers which include whether there is enough evidence or not (based on the
decision), the level of significance, and whether the original claim is supported or rejected.
4
Conclusions are based on the original claim, which may be the
null or alternative hypotheses. The decisions are always based on
the null hypothesis

Original Claim
H0 H1
Decision "REJECT" "SUPPORT"
Reject H0 There is sufficient evidence at There is sufficient evidence at the alpha
"SUFFICIENT" the alpha level of significance level of significance to supportthe claim
to reject the claim that (insert that (insert original claim here)
original claim here)
Fail to reject H0 There is insufficient evidence There is insufficient evidence at the alpha
"INSUFFICIENT" at the alpha level of level of significance tosupport the claim
significance to reject the claim that (insert original claim here)
that (insert original claim here)

Type of Tests

This document will explain how to determine if the test is a left tail,
right tail, or two-tail test.

The type of test is determined by the Alternative Hypothesis ( H1 )

Left Tailed Test

H1: parameter < value


Notice the inequality points to the left

Decision Rule: Reject H0 if t.s. < c.v.

Right Tailed Test

H1: parameter > value


Notice the inequality points to the right
5
Decision Rule: Reject H0 if t.s. > c.v.

Two Tailed Test

H1: parameter not equal value


Another way to write not equal is < or >
Notice the inequality points to both sides

Decision Rule: Reject H0 if t.s. < c.v. (left) or t.s. > c.v. (right)

The decision rule can be summarized as follows:

Reject H0 if the test statistic falls in the critical region

(Reject H0 if the test statistic is more extreme than the critical value)

Hypothesis Testing Steps

Here are the steps to performing hypothesis testing

1. Write the original claim and identify whether it is the null hypothesis or the alternative hypothesis.
2. Write the null and alternative hypothesis. Use the alternative hypothesis to identify the type of test.
3. Write down all information from the problem.
4. Find the critical value using the tables
5. Compute the test statistic
6. Make a decision to reject or fail to reject the null hypothesis. A picture showing the critical value and
test statistic may be useful.
7. Write the conclusion.

Testing a Single Mean

You are testing mu, you are not testing x bar. If you knew the value of mu, then there would be nothing to
test.

All hypothesis testing is done under the assumption the null hypothesis is true!

I can't emphasize this enough. The value for all population parameters in the test statistics come from the null
hypothesis. This is true not only for means, but all of the testing we're going to be doing.

Population Standard Deviation Known

If the population standard deviation, sigma, is known, then the population mean has a normal distribution,
and you will be using the z-score formula for sample means. The test statistic is the standard formula you've
seen before.

The critical value is obtained from the normal table, or the bottom line from the t-table.
6
Population Standard Deviation Unknown

If the population standard deviation, sigma, is unknown, then the population mean has a student's t
distribution, and you will be using the t-score formula for sample means. The test statistic is very similar to
that for the z-score, except that sigma has been replaced by s and z has been replaced by t.

The critical value is obtained from the t-table. The degrees of freedom for this test is n-1.

If you're performing a t-test where you found the statistics on the calculator (as opposed to being given them
in the problem), then use the VARS key to pull up the statistics in the calculation of the test statistic. This
will save you data entry and avoid round off errors.

General Pattern

Notice the general pattern of these test statistics is (observed - expected) / standard deviation.

Testing a Single Proportion

You are testing p, you are not testing p hat. If you knew the value of p, then there would be nothing to test.

All hypothesis testing is done under the assumption the null hypothesis is true!

I can't emphasize this enough. The value for all population parameters in the test statistics come from the null
hypothesis. This is true not only for proportions, but all of the testing we're going to be doing.

The population proportion has an approximately normal distribution if np and nq are both at least 5.
Remember that we are approximating the binomial using the normal, and that the p we're talking about is the
probability of success on a single trial. The test statistic is shown in the box to the right.

The critical value is found from the normal table, or from the bottom row of the t-table.

The steps involved in the hypothesis testing remain the same. The only thing that changes is the formula for
calculating the test statistic and perhaps the distribution which is used.

General Pattern

Notice the general pattern of these test statistics is (observed - expected) / standard deviation.

Probability Values

Classical Approach
7
The Classical Approach to hypothesis testing is to compare a test statistic and a critical value. It is best used
for distributions which give areas and require you to look up the critical value (like the Student's t
distribution) rather than distributions which have you look up a test statistic to find an area (like the normal
distribution).

The Classical Approach also has three different decision rules, depending on whether it is a left tail, right tail,
or two tail test.

One problem with the Classical Approach is that if a different level of significance is desired, a different
critical value must be read from the table.

P-Value Approach

The P-Value Approach, short for Probability Value, approaches hypothesis testing from a different manner.
Instead of comparing z-scores or t-scores as in the classical approach, you're comparing probabilities, or
areas.

The level of significance (alpha) is the area in the critical region. That is, the area in the tails to the right or
left of the critical values.

The p-value is the area to the right or left of the test statistic. If it is a two tail test, then look up the
probability in one tail and double it.

If the test statistic is in the critical region, then the p-value will be less than the level of significance. It does
not matter whether it is a left tail, right tail, or two tail test. This rule always holds.

Reject the null hypothesis if the p-value is less than the level of significance.

You will fail to reject the null hypothesis if the p-value is greater than or equal to the level of significance.

The p-value approach is best suited for the normal distribution when doing calculations by hand. However,
many statistical packages will give the p-value but not the critical value. This is because it is easier for a
computer or calculator to find the probability than it is to find the critical value.

Another benefit of the p-value is that the statistician immediately knows at what level the testing becomes
significant. That is, a p-value of 0.06 would be rejected at an 0.10 level of significance, but it would fail to
reject at an 0.05 level of significance. Warning: Do not decide on the level of significance after calculating
the test statistic and finding the p-value.

Here is a proportion to help you keep the order straight. Any proportion equivalent to the following statement
is correct.

The test statistic is to the p-value as the critical value is to the level of significance.

Two Parameter Testing

Definitions
8
Dependent Samples
Samples in which the subjects are paired or matched in some way. Dependent samples must have the
same sample size, but it is possible to have the same sample size without being dependent.
Independent Samples
Samples which are independent when they are not related. Independent samples may or may not have
the same sample size.
Pooled Estimate of the Variance
A weighted average of the two sample variances when the variances are equal. The variances are
"close enough" to be considered equal, but not exactly the same, so this pooled estimate brings the
two together to find the average variance.

Вам также может понравиться