{ "cells": [ { "cell_type": "markdown", "id": "15986c3a895a01a7", "metadata": {}, "source": [ "# Chapter 1: Hypothesis Testing & Maximum Likelihood\n", "\n", "In the first chapter of these lecture notes, we cover ... . We happily invite you to run the examples yourselves, and play around with some of the values!" ] }, { "cell_type": "markdown", "id": "7188031a-1f74-489a-a8cc-7c6a6da76090", "metadata": {}, "source": [ "## **Hypothesis Testing**\n", "\n", "A hypothesis is a testable statement. The hypothesis predicts certain behaviour of a system and/or describes the relationship between certain parameters. Hypothesis testing revolves around making decisions based of samples from your population or lab.\n", "\n", "The Null hypothesis ($H_0$) is the default assumption that there exists no relationship between two measure phenomena. The alternative hypothesis ($H_1$) is the complement of the null hypothesis. \n", "\n", "Let a testable parameter $\\theta\\in\\Theta$ denote the outcome of a trial. Given a hypothesis one can partition the comnplete parameter space $\\Theta$ into two complementary sets, $\\Theta_0$ and $\\Theta_1$, such that $\\Theta_0$+$\\Theta_1$=$\\Theta$. The hypothesis test tests whether $\\theta\\in\\Theta_0$ or $\\theta\\in\\Theta_1$ and hence whether $H_0$ or $H_1$ is more aligned with the data.\n", "\n", "### Note\n", "A null hypothesis can never be accepted. For that to happen, an infinite number of measurements must be made, which is impossible. It is only possible to find evidence *against* the null hypothesis." ] }, { "cell_type": "markdown", "id": "dfad682f-df14-4056-bcb3-3b8c6ebc7a72", "metadata": {}, "source": [ "### **Example 1.1**\n", "\n", "Let $\\theta$ characterize the shift in frequency of light due to a difference in the velocity of an observer compared to its source (Doppler shift). A sceptical astronomer may be interested to see whether the Doppler shift exists or not. In this case the null hypothesis states $H_0: \\theta = 0$, implying that there is no shift in frequency. The alternative hypothesis states $H_1: \\theta \\neq 0$.\n", "\n", "If the sceptical astronomer researches the hypothesis thoroughly (with perfect equipment), they will find that $\\theta\\neq0$ (the Doppler effect exists). Thus, the astronomer should reject the Null hypothesis. On the contrary, suppose the sceptical astronomer uses faulty equipment and finds $\\theta=0$, they should then retain the Null hypothesis.\n", "\n" ] }, { "cell_type": "markdown", "id": "633bd264-062d-4b74-a9bc-cbf5c637057b", "metadata": {}, "source": [ "### **Type I \\& type II errors in hypothesis testing**\n", "\n", "During hypothesis testing faulty equipment or wrong interpetation of data can lead to errors. A type I error occurs when the Null hypotesis is rejected when in reality it is true. A type II error occurs when a Null hypothesis is accepted while in reality it is false (see the latter scenario in example 1.1). \n", "\n", "