# Need some help with probability and density funtions.

• Jul 26th 2010, 11:24 AM
Mattpd
Need some help with probability and density funtions.
I have two functions:

$f(x)=kx^2$ for x = 2, 3, 4, 6
$f(x)=kx^2$ for $2<=x<=6$

I need to find the popper value for k, the mean, and the variance.

For the first function I found k = 1/65 using the fact that the probabilities must sum to 1. Is this correct?

For the mean of the first function, do I plug in each value into the function, then take this result and multiply it by the value, then sum? Like this:

$(4/65 *2)+(9/65 *3)+(16/65 *4)+(36/65 *6)$ = 315/65 = 4.85?

And for the variance my notes say: Sum of (value * mean)^2 * prob. of the value

3219.68 is what I get, is this correct?

As far as the second density function, I am not sure where to start? How do you find the proper value for k when the function is continuous?
• Jul 26th 2010, 11:40 AM
SpringFan25
For the first function, your method for finding k is correct. Check that you have copied the function down correctly (looks like x=5 is missing, but this may be intentional).

Your method for the expected value of the first function is correct.

For the variance, i think your notes said "[Sum of (value - mean)^2] * Prob of value"

In the continuous case, you need to use integration. The pdf must integrate to 1 over its range
$\int_2^6 kx^2 = 1$

$k \int_2^6 x^2 = 1$

$k \left[ \frac{x^3}{3} \right]^6_2 = 1$

$k \left[ 72 - \frac{8}{3} \right] = 1$

$k \left[ \frac{208}{3} \right] = 1$

$k = \frac{3}{208}$
• Jul 26th 2010, 12:01 PM
Mattpd
Sweet. My notes do say - not *. Guess I was just writing too fast..

Is the mean of the second function 60/13?
• Jul 27th 2010, 10:49 AM
SpringFan25
You need to use integration to find the mean of a continuous pdf

$E(x) = \int_2^6 x f(x) dx$
$E(x) = \frac{3}{208} \int_2^6 x \times x^2 dx$

$E(x) = \frac{3}{208} \int_2^6 x^3 dx$
$E(x) = \frac{3}{208} \left[ \fra{x^4}{4} \right]^6_2 dx$

$E(x) = \frac{3}{208} \left[ \fra{x^4}{4} \right]^6_2$

$E(x) = \frac{3}{208} * 320$

= 60/13