Sie sind auf Seite 1von 5

Q. 4 What is the rationale of hypothesis testing?

Discuss testing
hypothesis about one mean, two means and proportions
using appropriate examples.

Answer:
INTRODUCTION TO HYPOTHESIS TESTING
Hypothesis testing is an essential procedure in statistics. A hypothesis test
evaluates two mutually exclusive statements about a population to determine
which statement is best supported by the sample data. When we say that a finding
is statistically significant, it’s thanks to a hypothesis test. The purpose of
hypothesis testing is to determine whether there is enough statistical evidence in
favor of a certain belief, or hypothesis, about a parameter.

How Hypothesis Testing Works


In hypothesis testing, an analyst tests a statistical sample, with the goal of
accepting or rejecting a null hypothesis. The test tells the analyst whether or not his
primary hypothesis is true. If it isn't true, the analyst formulates a new hypothesis
to be tested, repeating the process until data reveals a true hypothesis.

Statistical analysts test a hypothesis by measuring and examining a random sample


of the population being analyzed. All analysts use a random population sample to
test two different hypotheses: the null hypothesis and the alternative hypothesis.

The null hypothesis is the hypothesis the analyst believes to be true. Analysts
believe the alternative hypothesis to be untrue, making it effectively the opposite of
a null hypothesis. Thus, they are mutually exclusive, and only one can be true.
However, one of the two hypotheses will always be true.

Real World Example of Hypothesis Testing


If, for example, a person wants to test that a penny has exactly a 50% chance of
landing on heads, the null hypothesis would be yes, and the alternative hypothesis
would be no (it does not land on heads). Mathematically, the null hypothesis would
be represented as Ho: P = 0.5. The alternative hypothesis would be denoted as
"Ha" and be identical to the null hypothesis, except with the equal sign struck-
through, meaning that it does not equal 50%.

A random sample of 100 coin flips is taken from a random population of coin
flippers, and the null hypothesis is then tested. If it is found that the 100 coin flips
were distributed as 40 heads and 60 tails, the analyst would assume that a penny
does not have a 50% chance of landing on heads and would reject the null
hypothesis and accept the alternative hypothesis. Afterward, a new hypothesis
would be tested, this time that a penny has a 40% chance of landing on heads.

Four Steps of Hypothesis Testing


All hypotheses are tested using a four-step process:
1. The first step is for the analyst to state the two hypotheses so that only one
can be right.
2. The next step is to formulate an analysis plan, which outlines how the data
will be evaluated.

3. The third step is to carry out the plan and physically analyze the sample data.

4. The fourth and final step is to analyze the results and either accept or reject
the null hypothesis.

Null and Alternative Hypotheses


Before testing for phenomena, you form a hypothesis of what might be happening.
Your hypothesis or guess about what’s occurring might be that certain groups are
different from each other, or that intelligence is not correlated with skin color, or
that some treatment has an effect on an outcome measure, for examples. From this,
there are two possibilities: a “null hypothesis” that nothing happened, or there were
no differences, or no cause and effect; or that you were correct in your theory,
which is labeled the “alternative hypothesis.” In short, when you test a statistical
hypothesis, you are trying to see if something happened and are comparing against
the possibility that nothing happened. Confusingly, you are trying to disprove that
nothing happened. If you disprove that nothing happened, then you can conclude
that something happened.

Possible Conclusions
Once the statistics are collected and you test your hypothesis against the likelihood
of chance, you draw your final conclusion. If you reject the null hypothesis, you
are claiming that your result is statistically significant and that it did not happen by
luck or chance. As such, the outcome proves the alternative hypothesis. If you fail
to reject the null hypothesis, you must conclude that you did not find an effect or
difference in your study. This method is how many pharmaceutical drugs and
medical procedures are tested.

The Scenario
An economist wants to determine whether the monthly energy cost for families has
changed from the previous year, when the mean cost per month was $260. The
economist randomly samples 25 families and records their energy costs for the
current year.

I’ll use these descriptive statistics to create a probability distribution plot that
shows you the importance of hypothesis tests.

The Need for Hypothesis Tests


Why do we even need hypothesis tests? After all, we took a random sample and
our sample mean of 330.6 is different from 260. That is different, right?
Unfortunately, the picture is muddied because we’re looking at a sample rather
than the entire population.

Sampling error is the difference between a sample and the entire population.
Thanks to sampling error, it’s entirely possible that while our sample mean is
330.6, the population mean could still be 260. Or, to put it another way, if we
repeated the experiment, it’s possible that the second sample mean could be close
to 260. A hypothesis test helps assess the likelihood of this possibility!

Use the Sampling Distribution to See If Our Sample Mean is


Unlikely
For any given random sample, the mean of the sample almost certainly doesn’t
equal the true mean of the population due to sampling error. For our example, it’s
unlikely that the mean cost for the entire population is exactly 330.6. In fact, if we
took multiple random samples of the same size from the same population, we
could plot a distribution of the sample means.

A sampling distribution is the distribution of a statistic, such as the mean, that is


obtained by repeatedly drawing a large number of samples from a specific
population. This distribution allows you to determine the probability of obtaining
the sample statistic.

Fortunately, I can create a plot of sample means without collecting many different
random samples! Instead, I’ll create a probability distribution plot using the t-
distribution, the sample size, and the variability in our sample to graph the
sampling distribution.

Our goal is to determine whether our sample mean is significantly different from
the null hypothesis mean. Therefore, we’ll use the graph to see whether our sample
mean of 330.6 is unlikely assuming that the population mean is 260. The graph
below shows the expected distribution of sample means.

You can see that the most probable sample mean is 260, which makes sense
because we’re assuming that the null hypothesis is true. However, there is a
reasonable probability of obtaining a sample mean that ranges from 167 to 352,
and even beyond! The takeaway from this graph is that while our sample mean of
330.6 is not the most probable, it’s also not outside the realm of possibility.
Hypothesis Testing for a Proportion
Ultimately we will measure statistics (e.g. sample proportions and sample means)
and use them to draw conclusions about unknown parameters (e.g. population
proportion and population mean). This process, using statistics to make judgments
or decisions regarding population parameters is called statistical inference.

Example 1 above produced a sample proportion of 47% heads and is written:


^pp^ [read p-hat] = 47/100 = 0.47

P-hat is called the sample proportion and remember it is a statistic (soon we will
look at sample means, ¯xx¯.) But how can p-hat be an accurate measure of p, the
population parameter, when another sample of 100 coin flips could produce 53
heads? And for that matter we only did 100 coin flips out of an uncountable
possible total!

The fact that these samples will vary in repeated random sampling taken at the
same time is referred to as sampling variability. The reason sampling variability is
acceptable is that if we took many samples of 100 coin flips an calculated the
proportion of heads in each sample then constructed a histogram or boxplot of the
sample proportions, the resulting shape would look normal (i.e. bell-shaped) with a
mean of 50%.

[The reason we selected a simple coin flip as an example is that the concepts just
discussed can be difficult to grasp, especially since earlier we mentioned that rarely
is the population parameter value known. But most people accept that a coin will
produce an equal number of heads as tails when flipped many times.]

A statistical hypothesis test is a procedure for deciding between two possible


statements about a population. The phrase significance test means the same thing
as the phrase "hypothesis test."

The two competing statements about a population are called the null hypothesis
and the alternative hypothesis.

A typical null hypothesis is a statement that two variables are not related. Other
examples are statements that there is no difference between two groups (or
treatments) or that there is no difference from an existing standard value.
An alternative hypothesis is a statement that there is a relationship between two
variables or there is a difference between two groups or there is a difference from a
previous or existing standard.

NOTATION: The notation Ho represents a null hypothesis and Ha represents an


alternative hypothesis and po is read as p-not or p-zero and represents the null
hypothesized value. Shortly, we will substitute μo for when discussing a test of
means.

Ho: p = po
Ha: p ≠ po or Ha: p > po or Ha: p < po [Remember, only select one Ha]

The first Ha is called a two-sided test since "not equal" implies that the true value
could be either greater than or less than the test value, po. The other two Ha are
referred to as one-sided tests since they are restricting the conclusion to a specific
side of po.

Statistical Significance

A sample result is called statistically significant when the p-value for a test statistic
is less than level of significance, which for this class we will keep at 0.05. In other
words, the result is statistically significant when we reject a null hypothesis.

Five Steps in a Hypothesis Test

1. Check any necessary assumptions and write null and alternative hypotheses.
2. Calculate an appropriate test statistic.
3. Determine a p-value associated with the test statistic.
4. Decide between the null and alternative hypotheses.
5. State a "real world" conclusion.

__________________________________________________________________

Das könnte Ihnen auch gefallen