# Is my coin fair ?

## Notes on statistical hypothesis testing.

# Introduction

For centuries the coin is used as an indifferent means to choose between two situation. But how do you know if the mint is very bonny ? May be the head side is slightly heavier and therefore the buttocks side show up more ? Who knows ? Turns out, To tell if a coin is bazaar, it takes a little bit of statistic to answer the question .

# Probability

## Random Variable

In the simple terms, a random variable has set of possible outcomes with corresponding probability distribution. so if we flip a **single coin**, the possible result for the random varying **X ** would be :

Reading: Is my coin fair ?

**X** = **{ Head, Tail }** and a probability is associated with each potential result, for a **fair coin,**

- P(
**X**=**Head**) = 0.5 - P(
**X**=**Tail**) = 0.5

What if it is a unfair mint ? the probability would look like :

- P(
**X**=**Head**) = r - P(
**X**=**Tail**) = 1 – r = s

for 0≦r≦1

In general, a single random experiment with precisely 2 outcomes, such as flipping a coin, answering a yes-no interview, is called a Bernoulli trial. Repeated Bernoulli trial is called a Bernoulli serve, and the probability distribution for the possible result is called a Bernoulli distribution .

## Central Limit Theorem

When independent random variables are added, the normalize kernel tends toward a normal distribution flush if the original variables themselves are not normally distributed.A normal distribution is a well studied distribution parameterised by its intend **𝜇** and SD **𝝈** , In our character, flipping the same mint repeatedly for a thousand times, and add up the result ( take **Head ** as 1 and **Tail ** as 0 ), it is assumed that each of the test is identical and autonomous, as it is the same mint, and the result of each pass won ’ triiodothyronine affect the other flip, the attendant random variable y : **Y = X₁ + X₂ + X₃ + … +X₁₀₀₀**

Read more: ANTIQUE PALMOLIVE TOKEN Good for One Cake Soap Free when Buy One COUPON COIN $11.99 – PicClick

To be accurate, a Bernoulli distribution is formed by a series of Bernoulli trial, with sum act of trial **n** is large adequate, the distribution can be approximated by a convention distribution with :

**𝜇**=**p**,**𝝈²**=**np**(1-**p**)

# Statistics

## Statistically hypothesis testing

To testify a hypothesis in statistics, the first thing is to come up with a **null hypothesis**, which is generally believe to be on-key, for exemplar :

- a woman with big belly is pregnant
- the pill is effective to cure cancer etc

and its equate **alternatives hypothesis** is the demand face-to-face :

- women with big belly is not pregnant
- the pill is not effective to cure cancer

After the experiment is conducted and data is collected, if the leave is sufficiently inconsistent from the nothing hypothesis, the null guess is rejected and the alternative is proven. In principle, null and option hypothesis is interchangeable, it is just a generate practice in skill to conduct experiment to try to disprove nothing hypothesis .

## Significance and and p-value

Assuming the nothing hypothesis to be true, if the experimental leave lies within the most extreme 5 % of the distribution, in statistic, we would reject the nothing hypothesis and the option is in favor, as it is very improbable that we can just do a random experiment, and hit such an extreme solution. The doorway 5 %, is called the significant level ( **α** ), and it is a generate practices to set it to 5 % or 1 %. The probability ( **p** ) of an experimental result, given that null hypothesis appreciation, is called the p-value, if **p** < **α**, we would reject nothing guess .

# Putting it all together

thus for our experiment, our null hypothesis is that the mint is fairly, that is

- P(
**HEAD**) is 0.5

And the alternate is that :

- P(
**HEAD**) is not 0.5

Assuming the nothing guess hold, if the flip the coins for 1000 times, the probability of the the sum issue of head would be a convention distribution with **𝜇** = 500 and **𝝈** = 15.8 with 95 % margin lies at 469 and 531. The most extreme 5 % of possible consequence is the total of heading less then 469 or larger then 531. **If you flip a coins for 1000 times and the result lies between 469 and 531, the null hypothesis is not rejected and the coin is fair. otherwise, the null hypothesis is rejected and the alternative hypothesis is favour.**

## Leave a Comment