Suppose the data follow normal distribution, with mean μ and standard deviation σ, or in experiment, we call the s.d. be error or fluctuation. and the μ is the hypothetical true mean.

now we take several data and by that, we want to know

- How many data should be taken to make the different between data mean and true mean is less then certain value, say, ½ s.d. be 95.5%?
- what is the confident interval for our data mean from n-th data is within 2 s.d. or 95.5%?

first, let us establish the data statistic. say, we have n-th data: X1, X2, … , Xn, all from the same sample space of a normal distribution ( for example ). we write:

and that the data mean

should follow the usual rule of summing up normal distribution:

thus,

therefore, let our calculated data mean be , the probability that the data mean is within certain number of error is:

using standardized normal distribution:

the number of data we should take to make the probability larger then 95.5% or 2 s.d. require:

or in general, with number of s.d. ( γ ),

this mean, a higher probability or lower different, we need more data. In fact, is what we called confident interval or 95.5 %, which is directly related to the number of s.d. ( γ ).

now, there are few parameter, data mean , sample s.d. , number of data n, confident interval and absolute different from the true mean α. we can rephrase question:

- given , what is n?
- given , what is α ?

which mean, the 2nd question is revert the process. thus,

thus, a larger probability, the larger the confident interval. and which is quite obvious. a large interval will have more chance to cover the true mean.

### Hypothesis testing

in the above discussion, we assumed that the……..

**************************** example ****************

for coin tossing: if we want to know whether the coin was unbiased, i.e, the expected value is different from 0.5. if we want the different is less then 0.1, thus, we have to at least toss the coin for 25 times for having 99.5% confident for the expected value within (0.4 , 0.6). In fact, if we tossed a coin for 25 times, and the data mean is 0.6, we have 99.5% confident that the coin is unbiased around ( 0.5, 0.7). this is same as testing in casino.

if we have only tossed a coin for 10 times, what is the confident interval for having 99.5% confident the true mean is with it? the answer is ( x – 0.32 , x + 0.32 ).

Now, for example, i tossed a coin with 11 head and 14 tail. thus, i have 99.5% confident that the true chance of head is lying between ( 0. 34, 0.54 ) and the true chance for the tail is ( 0.46, 0.66) thus, there is a overlap of those chance.

However, in the above discussion, we assumed the standard deviation for the coin is 0.5, which is from the assumption that the coin is unbiased. So, it is quite a looping logic. we assumed the coin is unbiased and then find whether it is unbiased.

To solve this, the hypothesis testing is required. it runs like this:

we assumed the coin is unbiased, μ=0.5 , thus, we will have the theoretical distribution, say, the 99.5% confident interval should be lay on ( 0.4, 0.6) for n=25. We also have to set the accept region or reject region, say, 0.5% or z = 1.96 for standardized normal distribution. Thus, we do experiment, and say, after the 25 tosses, we have 11 heads, thus, the standardized z is :

thus, this result is accepted and the hypothesis that the coin is unbiased is true. or we can see, by the fact that the data mean is within the 99.5% confident interval, thus, we should accept the hypothesis. However, there is still a chance for the true mean is not at 0.5 and outside the region (0.4, 0.6), by 0.5% chance. this is called type II error, or false true. in more concrete:

P( 0.4 < θ < 0.6 | μ < 0.4 or μ > 0.6 ) = 0.5%

and also there is a chance that we reject the hypothesis by getting our data mean not in the region, this is called Type I error, or true negative.

P( θ < 0.4 or θ > 0.6| 0.4 < μ < 0.6 )

****Remark ****

the hypothesis testing is not quite sure.

## Leave a Reply