# Standardizing a normal variable

#### parixit

##### New Member
I am trying to understand the binomial distribution, normal distribution and standard normal distribution using the attached excel file.

The example in use is calculating the distribution of a random variable $$X$$ which is equal to k successful shots out of n trials in basket ball. The probability p of making a shot is 0.5 (cell B3) and hence missing the shot (1-p) is 0.5 (cell B4). Hence this is a case of a binomial distribution.

Assuming that 30 attempts are made (cell B8), the distribution of $$X$$ of making k successful shots (k ranges from 0 to 30 populated in cells B15 through B45) is given in cells D15 through D45 using the Binomial distrubution formula

$$^nC_{k}.p^k.(1-p)^{n-k}$$

Using the formula for the expected value we know that the expected value for $$X$$ is $$E(X) = \mu_{x} = n.p$$, which is $$30 * 0.5 = 15$$. Also, the variance $$\sigma_{X}^2 = n.p.(1-p)$$ is $$30*0.5*0.5 = 7.5$$ as shown in cell B10. Hence the standard deviation for $$X, \sigma_{X}$$ is 2.739 as shown in cell B11.

Using the values of $$\mu_{x}$$ and $$\sigma_{x}$$ the values for the continuous probability distribution function can be obtained using the formula
$$p(x)=\frac{1}{\sqrt{2\pi\sigma_{x}^2}}exp\left(-\frac{1}{2}\left(\frac{x-\mu_{x}}{\sigma_{x}}\right)^2\right)$$

which can be reduced to $$p(x) = \frac{1}{\sqrt{2\pi\sigma_{x}^2exp\left(\frac{\left(x-\mu_{x}\right)}{\sigma_{x}}\right)^2}}$$.
The reduced formula is used to caluclate probabilites at different values of k in cells E15 through E45. To cross check the mean, variance and standard deviation i.e. $$E[X] = \mu_{x}, \sigma_{x}^2, \sigma_{x}$$ are recalculated and turn out to be, as expected, equal to 15, 7.5 and 2.73 as shown in cells D9, D10 and D11.

Now, the random variable $$X$$ is standardized by performing the following operation on it.

$$Z = \frac{X-\mu_{x}}{\sigma_{x}}$$

The standardization is done for each value of k and the standardized values can be seen in cells G15 through G45. The standardized variable can be referred to $$Z$$ and the values are populated in cells G15 through G45. Since standardizing a normally distributed variable leads to another distributed variable with $$\mu_{z}=0$$ and $$\sigma_{z}=1$$ , the probability density function further reduces to

$$p(z) = \frac{1}{\sqrt{2\pi.exp(z^2)}}$$

The $$p(z)$$ values for values of Z are populated in cells H15 to H35.

Just to cross check again I calculated the $$E[Z]=\mu_{Z}, \sigma_{Z}^2, \sigma_{Z}$$ values in cells F9, F10 and F11 which should be 0, 1 and 1 respectively but they are turning out to be something else. I have tried to repeatedly recheck what I have plugged into the cells but all seems fine and yet the cross checks do not work and I am very curious to know where I am going wrong. Many thanks in advance.