Documente Academic
Documente Profesional
Documente Cultură
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.
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.
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.
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.
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.
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!
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.
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.]
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.
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.
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.
__________________________________________________________________