Monday, May 24, 2010

How to find C? Probability distribution/cumulative function?

Determine the value of the constant, c, so the f(x) is a probability distribution function. Then determine the cumulative distribution function:





(a) f(x) = 1/5e^(-cx) for -1 is less than or equal to x less than or equal to 7

How to find C? Probability distribution/cumulative function?
For f(x) to be a valid distribution function, it must verify:





Integral(-∞ to +∞)f(x)dx = 1





Your definition seems to suggest that f(x) = 1/5e^(-cx) for -1≤x≤7, and


f(x)= 0 otherwise.


We are left to find a value of c that verifies:





Integral(-1 to 7)1/5e^(-cx)dx = 1





an antiderivative of 1/5e^(-cx) is -1/(5c)e^(-cx)





Integral(-1 to 7)1/5e^(-cx)dx= -1/(5c)(e^(-7c) - e^(c))





There is no literal solution for -1/(5c)(e^(-7c) - e^(c))=1


The value of c can only be estimated.





I used this vbscript:


------------------


c = 2


step = 0.00001


do while x(c) %26lt; 1


c = c + step


loop


Msgbox "Value for c = " %26amp; c %26amp; " :" %26amp; x(c)





Function x(c)


e = 2.71828182846


x = (e^c - e^(-7*c))/(5*c)


End Function


------------------





and found an approximation of c = 2.54265





Cumulative distribution function:





F(X≤x) = Integral(-1 to x)f(x)dx = -1/(5c)(e^(-cx) - e^(c))


F(X≤x) = (12.7133 - e^(-2.54265x))/12.71325


No comments:

Post a Comment