# Hypothesis testing

A hypothesis test can be conducted as a two-sided or one-sided test.

##### Two-sided test:
• ${\displaystyle H_{0}=\psi (\theta )={\psi _{0}}}$
• ${\displaystyle H_{1}=\psi (\theta )\neq {\psi _{0}}}$

Location Normal model:

${\displaystyle P_{\mu _{0}}(|{{{\bar {x}}-\mu _{0}} \over {\sigma _{0}/{\sqrt {n}}}}|\geq |{{{\bar {x}}_{obs}-\mu _{0}} \over {\sigma _{0}/{\sqrt {n}}}}|)=2[1-\phi ({{{\bar {x}}_{obs}-\mu _{0}} \over {\sigma _{0}/{\sqrt {n}}}})]}$

Location Scale Normal model:

${\displaystyle t_{obs}={{{\bar {x}}_{obs}-\mu _{0}} \over {s_{obs}/{\sqrt {n}}}}}$

${\displaystyle P_{(\mu _{0},\sigma )}(|T|\geq |t_{obs}|)=2[1-G(|t_{obs};n-1)]}$

Bernoulli model:

${\displaystyle P_{\theta _{0}}=({{{\bar {x}}-{\theta _{0}}} \over {\sqrt {{{{\theta }_{0}}(1-{{\theta }_{0}})} \over {n}}}}\geq {{{\bar {x}}_{obs}-{\theta _{0}}} \over {\sqrt {{{{\theta }_{0}}(1-{{\theta }_{0}})} \over {n}}}})=2[1-\phi ({{{\bar {x}}_{obs}-{\theta _{0}}} \over {\sqrt {{{{\theta }_{0}}(1-{{\theta }_{0}})} \over {n}}}})]}$

##### One-sided test:

The one-sided test can be right-tailed or left-tailed:

• right-tailed: ${\displaystyle H_{0}=\psi (\theta )\leq {\psi _{0}}}$;${\displaystyle H_{1}=\psi (\theta )>{\psi _{0}}}$
• left-tailed: ${\displaystyle H_{0}=\psi (\theta )\geq {\psi _{0}}}$;${\displaystyle H_{1}=\psi (\theta )<{\psi _{0}}}$

As an example: Location Normal model:

${\displaystyle \max _{\mu \leq \mu _{0}}P_{\mu }(z\geq {z}_{obs})=P_{\mu _{0}}(z\geq {z}_{obs})=1-\phi (z_{obs})=1-\phi ({{x_{obs}-\mu _{0}} \over {\sigma _{0}/{\sqrt {n}}}})}$