https://www.youtube.com/watch?v=uzsNpYSiXjY&list=PLsri7w6p16vtEz_J1G7HQG-Rm8vpZPtPS&index=2 ================================================================================ * Set null hypothesis $$$H_0:\mu=\mu_0$$$ population mean = sample mean * Set anti-hypothesis - two sided test $$$H_1:\mu\ne \mu_0$$$ - Colored ends: null hypothesis is rejected - one sided test (1) left-one-sided test $$$H_1:\mu \mu_0$$$ (2) right-one-sided test $$$H_1:\mu>\mu_0$$$ ================================================================================ * Set p-value $$$\alpha=0.05$$$ against null hypothesis and anti hypothesis * If two sided, ================================================================================ ================================================================================ Left sided test Right sided test ================================================================================ * Example Test hypothesis when you know population's variance * Drink A says it has 300ml * Inspected 300 samples * Mean was 244.65 ml * std is 20. Question: * Set hypothesis * Perform left sided test with p-value=0.05 Answer: $$$H_0: \mu=300ml$$$ $$$H_1: \mu\lt 300ml$$$ p-value $$$\alpha=0.05$$$ $$$n=300$$$ $$$\mu_0=244.65ml$$$ $$$\sigma=20$$$ left sided test: $$$-z_{\alpha} \\ = -z_{0.05} $$$ * See the std normal distribution table $$$= -1.64$$$ If $$$z\lt -1.64$$$, $$$H_0$$$ is rejected, $$$H_1$$$ is selected * Test statistics z $$$z \\ = \frac{m-\mu}{\frac{\sigma}{\sqrt{n}}} \\ = \frac{244.65-300}{\frac{20}{\sqrt{300}}} \\ = -47.935$$$ Calculated $$$z = -47.935$$$ $$$z\lt -1.64$$$ is correct Conclusion: $$$H_0$$$ is rejected $$$H_1$$$ is selected ================================================================================