Calculating Standard Deviation for a Probability Density Function?

Click For Summary

Homework Help Overview

The discussion revolves around calculating the standard deviation for a probability density function defined as \( p(x) = C \ x \ exp(-x/ \lambda) \) over the interval \( 0 < x < +\infty \). Participants explore the normalization constant, mean, and variance in the context of probability theory.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants discuss the normalization of the probability density function and the calculation of the mean. There are questions about the correctness of the mean and standard deviation calculations, as well as the implications of dimensional analysis. Some participants suggest using specific formulas for variance and standard deviation, while others express confusion about variable substitutions in integrals.

Discussion Status

The discussion is active, with participants providing hints and corrections regarding the calculations of mean and standard deviation. Some guidance has been offered on the use of variance formulas, and there are multiple interpretations being explored regarding the integration process and variable substitutions.

Contextual Notes

Participants note potential errors in calculations and the importance of dimensional consistency. There is an ongoing examination of the assumptions made in the setup of the problem, particularly regarding the normalization constant and the integration limits.

Schwarzschild90
Messages
111
Reaction score
1

Homework Statement


Continuous probability.PNG


Homework Equations


See below

The Attempt at a Solution



\begin{align}
\begin{split}
p(x) = C \ x \ exp(-x/ \lambda)
\end{split}
\end{align}

If $p(x)$ is a probability density function on the interval $ 0 \textless x \textless + \infty $ , then it follows that the normalization constant can be isolated by setting the area under the curve equal to one

\begin{align}
\begin{split}
\int_0^\infty p(x) \ dx = 1 \to \\ C \int_0^\infty x \ exp(-x/ \lambda) \ dx = 1 \to \\ C \lambda^2 = 1 \to \\ C = \frac{1}{\lambda^2}
\end{split}
\end{align}

\subsection*{(b)}
The mean $\mu$ (or expection $E(X)$) of X is

\begin{align}
\begin{split}
mean = E(X) = \int_a^b x \ f(x) \ dx = \frac{1}{\lambda^2} \int_0^\infty x^2 \ exp(-x/ \lambda) \ dx = 2 \lambda^3
\end{split}
\end{align}

\subsection*{(c)}
Now, determine the standard deviation $\sigma$ of X

\begin{align}
\begin{split}
\sigma =
\end{split}
\end{align}
 
Physics news on Phys.org
In 3), did you forget the factor C?
Are you stuck on the standard deviation, or did your post just get truncated?
What formulae do you know related to variance and s.d.?
 
  • Like
Likes   Reactions: Schwarzschild90
I imagined that someone could see if what I had already done was correct

I know the following formula for variance: (E(X^2) - mu^2)
 
Schwarzschild90 said:

Homework Statement


View attachment 95542

Homework Equations


See below

The Attempt at a Solution



\begin{align}
\begin{split}
p(x) = C \ x \ exp(-x/ \lambda)
\end{split}
\end{align}

If $p(x)$ is a probability density function on the interval $ 0 \textless x \textless + \infty $ , then it follows that the normalization constant can be isolated by setting the area under the curve equal to one

\begin{align}
\begin{split}
\int_0^\infty p(x) \ dx = 1 \to \\ C \int_0^\infty x \ exp(-x/ \lambda) \ dx = 1 \to \\ C \lambda^2 = 1 \to \\ C = \frac{1}{\lambda^2}
\end{split}
\end{align}

\subsection*{(b)}
The mean $\mu$ (or expection $E(X)$) of X is

\begin{align}
\begin{split}
mean = E(X) = \int_a^b x \ f(x) \ dx = \frac{1}{\lambda^2} \int_0^\infty x^2 \ exp(-x/ \lambda) \ dx = 2 \lambda^3
\end{split}
\end{align}

\subsection*{(c)}
Now, determine the standard deviation $\sigma$ of X

\begin{align}
\begin{split}
\sigma =
\end{split}
\end{align}

Your computation of ##EX## is incorrect.

Hint: check dimensions. If ##X## happened to be a time, ##\lambda## would have dimensions of time also, and so your ##\lambda^3## would have dimensions of ##\text{time}^3## (but should be just 'time').
 
  • Like
Likes   Reactions: Schwarzschild90
I forgot to divide by λ2.

Now, does 2/λ seem reasonable in your eyes?
 
Schwarzschild90 said:
I forgot to divide by λ2.

Now, does 2/λ seem reasonable in your eyes?

Both reasonable and correct, not only in my eyes but absolutely.
 
  • Like
Likes   Reactions: Schwarzschild90
Schwarzschild90 said:
I forgot to divide by λ2.

Now, does 2/λ seem reasonable in your eyes?
Now you seem to have divided by λ4.
If you replace x with λu in the integral you can see you should get a factor λ and an integral independent of λ.
Schwarzschild90 said:
I
I know the following formula for variance: (E(X^2) - mu^2)
So turn that into an integral. You already have μ.
 
  • Like
Likes   Reactions: Schwarzschild90
Ray Vickson said:
Both reasonable and correct, not only in my eyes but absolutely.

Sorry: I am so used to looking at such distributions in the form ##c t e^{-\lambda t}## (that is, with ##\lambda t## instead of ##t/\lambda##) that my brain failed to process the difference in your case. So, NO: you are still not correct.
 
  • Like
Likes   Reactions: Schwarzschild90
Like this? I don't understand why we replace x with lambda u

\begin{align}
\begin{split}
mean = E(X) = \int_a^b x \ f(x) \ dx = \frac{1}{\lambda^2} \int_0^\infty (\lambda u)^2 \ exp(-(\lambda u)/ \lambda) \ dx =
\end{split}
\end{align}
 
  • #10
Schwarzschild90 said:
Like this? I don't understand why we replace x with lambda u

\begin{align}
\begin{split}
mean = E(X) = \int_a^b x \ f(x) \ dx = \frac{1}{\lambda^2} \int_0^\infty (\lambda u)^2 \ exp(-(\lambda u)/ \lambda) \ dx =
\end{split}
\end{align}
I was just using that to show that the final expression must be linear in lambda.
##\frac{1}{\lambda^2} \int_0^\infty (\lambda u)^2 \ exp(-(\lambda u)/ \lambda) \ d(\lambda u)=\lambda\int_0^\infty u^2e^{-u}.du##. Your first version ended up with a factor λ3 because you forgot the factor C=λ-2, but then somehow you got λ-1, as though you made the correction twice over.
 
  • Like
Likes   Reactions: Schwarzschild90
  • #11
So, 2\lambda would be correct?
 
  • #12
Schwarzschild90 said:
So, 2\lambda would be correct?
Yes.
 
  • Like
Likes   Reactions: Schwarzschild90
  • #13
Will use this formula to calculate the standard deviation
\begin{align}
\begin{split}
\sigma = std(X) =\sqrt{ \int_a^b (x-\mu)^2 \ f(x) \ dx }
\end{split}
\end{align}
 
  • #14
Schwarzschild90 said:
Will use this formula to calculate the standard deviation
\begin{align}
\begin{split}
\sigma = std(X) =\sqrt{ \int_a^b (x-\mu)^2 \ f(x) \ dx }
\end{split}
\end{align}
Ok, but you might find the form var(X)=E(X2)-E(X)2 more convenient than E((X-E(X))2).
 
  • #15
I assume sqrt(E(X2)-E(X)2)?
 
  • #16
Schwarzschild90 said:
I assume sqrt(E(X2)-E(X)2)?
For standard deviation, yes. I was quoting formulae for variance (σ2).
 
  • Like
Likes   Reactions: Schwarzschild90
  • #17
\begin{align}
\begin{split}
E(X^2) = \frac{1}{\lambda^2} \int_0^\infty x^3 \ exp(-x/ \lambda) \ dx = 6 \lambda^2 \\
\mu^2 = 4\lambda^2 \\
\sigma = std(X) = \sqrt{var(X)} = \sqrt{E(X^2) - \mu^2} = \sqrt{6\lambda^2 - 4\lambda^2}= \sqrt{2\lambda^2} = \sqrt{2}\lambda \\
\end{split}
\end{align}

It seems almost impossible to commit a mistake using the above equation :P, but I've been wrong before
 
Last edited:
  • #18
Schwarzschild90 said:
\begin{align}
\begin{split}
E(X^2) = \frac{1}{\lambda^2} \int_0^\infty x^3 \ exp(-x/ \lambda) \ dx = 6 \lambda^2 \\
\mu^2 = 4\lambda^2 \\
\sigma = std(X) = \sqrt{var(X)} = \sqrt{E(X^2) - \mu^2} = \sqrt{6\lambda^2 - 4\lambda^2}= \sqrt{2\lambda^2} = \sqrt{2}\lambda \\
\end{split}
\end{align}

It seems almost impossible to commit a mistake using the above equation :P, but I've been wrong before
Looks right.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
1K
Replies
8
Views
1K
Replies
6
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
1K