# Estimated probability looks too large, what I am doing wrong?

A factory produces links for heavy metal chains. The research lab of the factory models the length (in cm) of a link by the random variable ${X}$, with expected value ${E(X) = 5}$ and variance ${Var(X) = 0.04}$. The length of a link is defined in such a way that the length of a chain is equal to the sum of the lengths of its links. The factory sells chains of 50 meters; to be on the safe side 1002 links are used for such chains. The factory guarantees that the chain is not shorter than 50 meters. If by chance a chain is too short, the customer is reimbursed, and a new chain is given for free.

Give an estimate of the probability that for a chain of at least 50 meters more than 1002 links are needed. For what percentage of the chains does the factory have to reimburse clients and provide free chains?

Number of links in a chain: ${n = 1002}$

Mean lengh of 1002 links: ${ \mu = 1002 \times 0.05 = 50.1 }$

We know variance, so we can find the standard deviation: ${ \sigma = \sqrt{0.04} = 0.2 }$

We are interested how often chain is shorter then 50 meters: ${ \bar{x} = 50 }$

Thus let define an appropriate test statistic: ${ \displaystyle z = \frac{ \mu - \bar{x} }{ \sigma } = \frac{50.1 - 50}{0.2} = \frac{0.1}{0.2} = 0.5 }$

Probability of getting value in a lower tail is: ${ \displaystyle P(z < 0.5) = \frac{1}{2} + \frac{1}{\sqrt{2\pi}} \int\limits_{0}^{0.5} e^{-\frac{z^2}{2}} dz }$

By making the substitution ${ z = \sqrt{2} x }$, we get: ${ \displaystyle \frac{1}{\sqrt{2\pi}} \int\limits_{0}^{0.5} e^{-\frac{z^2}{2}} dz = \frac{1}{\sqrt{\pi}} \int\limits_{0}^{\frac{0.5}{\sqrt{2}}} e^{-x^2} dx }$

As we can not solve integral above, let's consider ${ e^{-x^2} }$ as a Taylor series: ${ \displaystyle \sum\limits_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{n!} }$

Then the approximate probability is: ${ \displaystyle P(z < 0.5) = \frac{1}{2} + \frac{1}{\sqrt{\pi}} \sum\limits_{n=0}^{\infty} \frac{(-1)^n (\frac{c}{\sqrt{2}})^{2n+1} }{ n! (2n+1) } \simeq 0.691462 }$

But this probability looks too large. What I am doing wrong?

-
I am not entirely sure, but if E(X) is 10, that means that average brick is $10 +-$ standard deviation. Expected heigh of 50 bricks is 500 +- std. deviation of this pile. But it is equally possible that the wall will be higher than 500 as lower than 500 (since its a normal distribution or at least I exptect so) so P=0.5. Situation would be different, if E(X) was slightly larger or slightly smaller than 10 –  Smajl Nov 20 '12 at 14:40
a) The question says nothing about hypothesis testing, and it isn't clear to me how it could be answered using hypothesis testing. Could you please elaborate on the connection to hypothesis testing? b) The question doesn't contain enough information to calculate the desired probability. Did you perhaps forget to state the assumption that the distribution is normal? –  joriki Nov 20 '12 at 15:01
Your edit has changed the question asked in the body, but the title still asks the old question. Which of these two questions do you want to ask? Also, you still haven't clarified the connection between your question and hypothesis testing. –  joriki Nov 20 '12 at 15:30
@joriki, I want to ask a question which currently is in the body. Could you please change the title, as I don't know how to formulate it. As to hypothesis testing, I am not sure, just don't know how to solve it and it was my assumption, that I have to use it. –  Edward Ruchevits Nov 20 '12 at 15:36

Your questions stating "Whats the probability that you need more than 50 bricks to get wall higher than 500" can be rephrased as "What is the probability that 50 bricks are below 500".

You have to compute $z$: $z = \frac{X-\mu}{\sigma}$, where X is the highness of your wall you are testing (for example 500 or 510) and $\mu$ is the mean (resp $E(x)$ in your case). $\sigma$ is standart deviation, Im sure you can compute it by yourself for normal distribution.

Once you compute $z$, you must look into z-table for normal distribution and find your probability there. It is typically some small number, but if your $\sigma$ is small enough, it may be high (if your bricks dont wary much in hight, it is less probable that you get results that differ from your mean much).

Here is a nice manual how normal distribution works: http://www.statisticshowto.com/articles/normal-distribution-word-problems-less-than/

I still cant see any connection with hypothesis testing. I hope this helps you in some way...

-
Thank you! Manual is just perfect, it helped me so very much. –  Edward Ruchevits Nov 20 '12 at 17:27

The probability that more than $50$ bricks are needed to reach a height $\ge500$ is the probability that $50$ bricks have a height $\lt500$. Since the mean height of one brick is $10$ and the heights of the bricks are normally distributed, the mean total height of $50$ bricks is $500$, and this total height is also normally distributed. Thus the probability that it is $\lt500$ is exactly $1/2$, and so this is also the probability that more than $50$ bricks are needed to reach a height $\ge500$.

I still can't see any relation to hypothesis testing. It's also not clear to me why the question asks for an estimate, since it's straightforward to obtain the exact answer.

-
Thank you. But what if I'll ask for the probability that for a stack with height ≥510 more than 55 bricks are needed? I just want solution algorithm for more general case. –  Edward Ruchevits Nov 20 '12 at 15:44
@Edward: Then why did you ask about such a specific case? –  joriki Nov 20 '12 at 15:49

The random variable representing the length of the chain is $Y=\sum_{k=1}^{1002}X_k$, where $X_k$ gives the length of the $k$-th link. Variance is linear, so $\operatorname{Var}(Y)=1002\operatorname{Var}(X)=40.08$, and the standard deviation is about $6.33$ cm. An error of $-10$ cm corresponds to $z\approx-1.58$.

-
But I am getting ${ z \simeq 0.0158 }$. It is positive and hundred times smaller. Could you please explain how you get ${ z \simeq -1.58 }$? –  Edward Ruchevits Nov 21 '12 at 22:39
It’s just $10/\sqrt{40.08}$; are you sure that you’re using consistent units? I’m using cm throughout. –  Brian M. Scott Nov 21 '12 at 22:40
But what is with minus sign? –  Edward Ruchevits Nov 21 '12 at 22:41
@Edward: Because $5000$ cm is below the mean of $5010$ cm. It’s a deviation of $-10$ cm. –  Brian M. Scott Nov 21 '12 at 22:44
OK, thank you very much! –  Edward Ruchevits Nov 21 '12 at 22:47

You are using the wrong variance! The variance of the sum is the sum of the variances, by independence. So the variance is $(1002)(0.04)$. There is also a little issue of units. The mean is $5010$ cm. The standard deviation, when you compute it, will be in cm. One can convert this to metres, and use metres for the length of the chain. Or you can use cm for both.

Formally, if $X_1,X_2,\dots, X_n$ are the lengths of the links, and $X$ is the length of the chain, then $$X=X_1+X_2+\cdots+X_n.$$ By independence, the variance of the sum is the sum of the variances, so if $\sigma^2$ is the variance of any $X_i$, then $X$ has variance $n\sigma^2$.

As a further remark, the standard way to do the numerical work is not by a Taylor series calculation, but by using tables for the cumulative distribution of the standard normal (old tech) or by using appropriate software (new tech).

Thus you want to find the probability that a standard normal has value less than $$\frac{5000 -5010}{\sqrt{(1002)(0.04)}}.$$

So we want the probability that a standard normal is $\lt -1.57956$. Fom the usual tables, we can read off the approximate probability that $Z\lt 1.57956$. By symmetry, for our required probability we subtract this from $1$.

-
Thank you for explanation! –  Edward Ruchevits Nov 21 '12 at 22:48

The problem now seems to be about chains instead of bricks. The mean length of a chain of $1002$ links is $50.10$ m. The variance of the length of a chain of $1002$ links is $40.08$ cm$^2$, giving a standard deviation of $6.33$ cm. To get a chain of less than $50$ m, we would need to be $10\text{ cm}/6.33\text{ cm}=1.58$ standard deviations short. Use the normal distribution to determine the probability of being $1.58$ standard deivations below the mean.

-