So I'm doing some homework and I'm really struggling trying to figure out how to calculate the standard deviation. It's my understanding that to get it, you need the variance, but apparently I'm doing something wrong as I keep getting incorrect answers.

The problem reads as follows:

When parking a car in a downtown parking lot, drivers pay according to the number of hours or fraction thereof. The probability distribution of the number of hours cars are parked has been estimated as follows:

$\begin{array}{|c|c|c|c|c|c|c|c|c|} \hline x & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline P(x) & 0.205 & 0.131 & 0.113 & 0.095 & 0.067 & 0.029 & 0.023 & 0.337\\ \hline \end{array}$


A. Mean

B. Standard Deviation =

The cost of parking is 4.75 dollars per hour. Calculate the mean and standard deviation of the amount of revenue each car generates.

A. Mean =

B. Standard Deviation =

Now I've calculated the mean (4.552) for part 1, but I'm not sure how to get the standard deviation, it's my understanding that you use the mean to find the variance, and take the square root of that, but I seem to be getting the wrong answer (11.49) - could someone help me figure out what I'm doing wrong?

  • $\begingroup$ The variance is $\sum_{i=1}^n (x_i-\mu)^2\cdot p(x_i)$. I have $Var(x)=14.88$ $\endgroup$ – callculus Oct 3 '15 at 21:00

If $p_i$ is the discrete probability distribution and $x_1$ is the set of outcomes, then the mean $\mu$ and standard deviation $\sigma$ are given by

$$\mu =\sum_{i=1}^Nx_ip_i \tag 1$$


$$\sigma =\sqrt{\sum_{i=1}^N(x_i-\mu)^2p_i} \tag 2$$

Here, we find from $(1)$ that $\mu=4.552$. Then, with $x_i=i$, $p_i$ as given in the table of the OP, and $\mu=4.552$, we find using $(2)$ that

$$\bbox[5px,border:2px solid #C0A000]{\sigma =\sqrt{\sum_{i=1}^8 (i-4.552)^2p_i} =\sqrt{7.959296}}$$

  • 1
    $\begingroup$ You should exchange $\mu$ by $\sigma$ for your formulas. $\endgroup$ – callculus Oct 3 '15 at 21:01
  • $\begingroup$ @calculus Thank you for the catch .... +1 $\endgroup$ – Mark Viola Oct 3 '15 at 21:02
  • $\begingroup$ I was reading the formula incorrectly and subtracting $p_i$ from 4.552 instead of $i$ - thanks for that! $\endgroup$ – secondubly Oct 3 '15 at 21:05
  • $\begingroup$ Could you check what I have probably made wrong, because my result is twice of your result ? Here my calculations (You have to mark all the lines and copy them): wolframalpha.com/input/?i=%281-4.552%29%5E2*0.205+%2B%282-4.552%29%5E2*+0.131%2B%283-4.552%29%5E2*++0.113+%2B%284--4.552%29%5E2*+0.095+%2B%285-4.552%29%5E2*+0.067+%2B%286-4.552%29%5E2*+0.029+%2B%287-4.552%29%5E2*+0.023+%2B%288-4.552%29%5E2*+0.337 $\endgroup$ – callculus Oct 3 '15 at 21:06
  • $\begingroup$ @calculus It appears that most of this is correct. Are you sure that you added all of the results correctly? I cannot really locate an error. $\endgroup$ – Mark Viola Oct 3 '15 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.