STA258 Lecture 12
- Hypothesis Testing
- Example:
- You're measuring lifetime of mice under different medications.
- You can hypothesize that
hours of lifetime. - This is the population mean.
- Use a random sample to test the validity of the hypothesis.
- Say you have
- We can use the
- Say we get
- We don't have sufficient evidence to reject the hypothesis.
- Suppose
- We have sufficient evidence to reject the hypothesis.
- Suppose
- We have sufficient evidence to reject the hypothesis.
- But with
we have less evidence to reject, than with . - Decision rule, if
we reject the hypothesis that . - If
, we reject the hypothesis. - This one is stronger than the sample mean one.
- Example:
- Where
is the total parameter space. - Goal is to test the hypothesis that
vs is our null hypothesis, and is our alternative hypothesis.
- Rat Example:
- Same as above
- Simple hypothesis, point hypothesis, singleton set.
- Composite hypothesis, interval hypothesis, not a point hypothesis, not a singleton set.
is the space of sample. - Decision rule.
- A test of
vs is based on a subset of - The set
is the critical region or rejection region of the past. - This corresponding decision rule or test is:
- reject
we accept if - retain
reject if or
- reject
- We can't accept the null hypothesis, we can only reject it or fail to reject it (we have insufficient evidence to reject it).
- This is assuming we have a random sample.
- The true state of nature is the 'oracle'
-
- Example:
&\text{True State of Nature} \
\text{Decision} & H_{0}\text{ is True} & H_{a}\text{ is True} \
\text{Reject }H_{0} & \underbrace{\text{Type I Error}} _{\alpha} & \underbrace{\text{Correct Decision}} _{1-\beta} \
\text{Accept } H*{0} & \underbrace{\text{Correct Decision}} _{1-\alpha} & \underbrace{\text{Type II Error}} _{\beta}
\end
- This shows the second rejection region is stronger.
- Example:
-
-
-
- If it's more than
- Let's say
- If we choose the critical region to be
- What is
-
-
-
- Use R
- 1-pbinom(21,36,0.5)+pbinom(14,36,0.5)
-
- Answer from prof
-
-
-
-
-
- Use R
- pbinom(21,36,0.7)-pbinom(14,36,0.7)
-
- Answer from prof
-
- Usually we prioritize minimizing
-
- Example:
- Large sample test for mean
-
-
- Reject
- Decision rule: reject
- Back to the previous example we can get that
- Under normality:
-
-
- Decision rule: reject
-
- What if we have two sided alternative hypothesis?
-
-
- Decision rule: reject
-
-
-
- Let the both terms be
- Decision rule: reject
- In case of acceptance:
- Accept
- This is the same as the confidence interval for the mean.
- Accept
- Next lecture we will learn about P-values.
- Is
sufficiently large to reject ? - Compute the p value, which is the probability of
- Sample mean is greater than or equal to the observed sample mean, given that
is true. . - We expect a small p-value if
is true, and a large p-value if is true. - A small p-value is how strongly we reject
. - If
, we reject , otherwise we fail to reject . - If
in finance, then we have we reject , but if we have we fail to reject , even though the difference is very small.
- Sample mean is greater than or equal to the observed sample mean, given that
- Is