# Hypothesis Testing

I learned this in Enriched bio a while ago at Marianopolis College, I regret not learning this more seriously, as I have forgotten all of it now. Update: I am learning about it in STAT206!

**Hypothesis** is some claim (usually about a parameters) about the population.

**Null Hypothesis** ($H_{0}$): “Current belief”; conventional wisdom
**Alternate Hypothesis** ($H_{1}/H_{A}$): Challenge to $H_{0}$

There are two types of test

- Two-tailed (what we stick to in STAT206, using $=$)
- One-tailed (using inequality $<$ or $>$)

I finally understand this intuitively. If you fall within the region of rejection, then you reject your null hypothesis.

- We have enough evidence to support a claim that $H_{1}$ / $H_{0}$

You should form your hypothsis.

### 4-Step Method for Hypothesis Testing

- Construct the Test Statistic
- Calculate the value of the Test Statistic
- Seems like we use the Pivotal Quantity for the appropriate distribution

- Compute the p-value
- This is a little hard and intimidating, I don’t know what values I should be looking at
- Okay, I am starting to get it. I think you need to be careful about which test to use. If you
- If you variance is known, use Z-Table.
- If your variance is unknown, use the T-table, where your DOF is $n−1$.
- There is also DOF of $n−2$ if you are doing linear regression??

- Draw appropriate conclusions for the $p$-value
- $p<0.05⟹$ reject $H_{0}$, fail to reject $H_{1}$
- We can also say “we have enough evidence to support $H_{1}$”

- $p≥0.05⟹$ fail to reject $H_{0}$, reject $H_{1}$
- You can’t say the other way around, since 0.05 is not enough. You need to have another test
- “There does not appear to be a difference between enough evidence to show that $H_{1}$”

- $p<0.05⟹$ reject $H_{0}$, fail to reject $H_{1}$

Standard testing for a mean:

- There is not enough evidence to show a particular mean?? But that is kind of iffy

Comparing two means:

- Support of $H_{1}$: There is not enough evidence to show that the means are the same
- Support of $H_{0}$: There is not enough evidence to show that the means are different

Linear

- There seems to be linear relationships between X and Y.
- There is not enough evidence to show that a linear relationship exists between X and Y.

### Normal Hypothesis Testing

Let’s illustrate the 4-step method through an example of normal hypothesis testing.

Suppose $Y_{1},…Y_{25}∼N(μ,144)$, $Y_{i}$s are independent. $n=25$ and $y =50$. We want to test the following hypothesis:

- $H_{0}:μ=45$
- $H_{1}:μ=45$

Can we conclude that our sample data supports $H_{1}$?

##### Step 1: Construct the Test Statistic

See Test Statistic for more information. We’ve seen this before in Test Statistic for more information. We’ve seen this before in Confidence Interval: $Y∼N(μ,nσ_{2} )⟹n σ Y−μ =Z∼N(0,1)$ You conclude that you have the following $D$ value: $D=∣Z∣$

##### Step 2: Calculate the Test Statistic

$d=512 y −45 =512 50−45 ≈2.1$

##### Step 3: Compute the p-value

- If you variance is known, use Z-Table.
- If your variance is unknown, use the T-table, where your DOF is $n−1$.