Posts

Showing posts from April, 2023

Creating One Proportion Test with LAMBDA

Image
What is One Proportion Test The One Proportion Test compares a sample proportion against a target proportion. For example, you observe that you get 6 heads when you flip a coin 10 times (sample). You expect with a fair coin, the probability of getting heads is 0.5 or 50% of the time (target). The One Proportion Test allows you to assess if the flipped coin is a fair coin based on the observations. The test proves this by statistically comparing the observed proportion of heads to number of flipping 0.6, is equal to the expected proportion 0.5. We write the Null Hypothesis as the observed proportion is equal to the hypothesised proportion. `H_0: p = p_0` And the Alternative Hypothesis is that the observed proportion is not equal to the hypothesised proportion (two-tailed test). `H_1: p != p_0` We could also test if the observed proportion is greater than the hypothesised proportion (left tail test). `H_0: p >= p_0` Or if the observed proportion is less than the hypothesised proporti

Hypothesis Testing

Image
Hypothesis testing is the analysis of data using statistical methods, to assess if a statement (hypothesis) is true. Typically you form two possibilities: a Null Hypothesis proposing that there is NO statistical significance in the given set of observations, and an Alternative Hypothesis that contradicts the Null Hypothesis. The Alternative Hypothesis is what you are trying to test. If the finding is statistically significant, you reject the Null Hypothesis. Suppose you want to find out if a group of 11-year old children has the same average weight as the population's 11-year old children (problem). You would state the Null Hypothesis and the Alternative Hypothesis as: `H_0: bar x = mu` `H_1: bar x != mu` where `bar x` is the sample group mean weight of 11-year old children `mu` is the population mean weight of 11-year old children Pictorially you are trying to prove this. Two-Tailed and One-Tailed The above scenario is called a Two-Tailed test, as we are proving equality. A One-T