# What are the mean and standard deviation of the probability density function given by (p(x))/k=sinx for  x in [0,pi], in terms of k, with k being a constant such that the cumulative density across the range of x is equal to 1?

Feb 14, 2016

Mean: $\mu = \frac{\pi}{2}$
Standard Deviation: $\sigma = \frac{1}{2} \sqrt{{\pi}^{2} - 8}$

#### Explanation:

The recipe is:

$\textcolor{red}{\text{Step 1}}$
Determine the probability distribution function pdf, p(x) such that:
$P \left(x\right) = {\int}_{{x}_{1}}^{{x}_{2}} p \left(x\right) \mathrm{dx} = 1 \text{ over } \left[{x}_{1} , {x}_{2}\right]$
1 = int_(0)^(pi)ksin(x)dx = 2k; k=1/2
so your pdf is p(x) = 1/2 sinx; [0, pi]

$\textcolor{red}{\text{Step 1}}$
Determine the mean $\mu$ and standard deviation $\sigma$
a) Mean: $\mu = \frac{1}{2} {\int}_{0}^{\pi} x \sin x \mathrm{dx} = \frac{\sin x - x \cos x}{2} = \frac{\pi}{2}$
b) var: ${\sigma}^{2} = \frac{1}{2} {\int}_{0}^{\pi} {\left(x - \mu\right)}^{2} \sin x \mathrm{dx}$
${\sigma}^{2} = \frac{4 \left(2 x - \pi\right) \sin x - \left({\left(2 x - \pi\right)}^{2} - 8\right) \cos x}{2} = \frac{{\pi}^{2} - 8}{4}$
$\sigma = \frac{1}{2} \sqrt{{\pi}^{2} - 8}$