- How do I find the unknown constant in a probability density function?
- The whole function must integrate to 1, so the total area under f is 1. For a piecewise function, integrate each piece over its own range and add the results. For f(x)=kx on 0≤ x≤3, int₀³ kx dx=9k/2=1, so k=2/9. Set the area to 1, not the height of the function at one point.
- How do I find a probability from a probability density function?
- Probabilities are areas, so P(a<X<b)=int_a^(b)f(x) dx. If a boundary between two pieces lies inside the interval, split the integral at that boundary. For example, with f(x)=1/4 on 0≤ x<2 and f(x)=(4-x)/4 on 2≤ x≤4, P(1<X<3)=5/8.
- How do I find E(X) and Var(X) for a continuous random variable?
- The expected value of g(X) is int f(x) g(x) dx, using the probability density function f, never the cumulative distribution function F. Take g(x)=x for the mean and g(x)=x² for E(X²). Then Var(X)=E(X²)-(E(X))², which subtracts the mean squared. For f(x)=3x²/8 on 0≤ x≤2, E(X)=3/2 and Var(X)=3/20.
- How do I find a cumulative distribution function from a probability density function, and back again?
- The cumulative distribution function F(x)=P(X≤ x) comes from f by integrating, and f comes back by differentiating. Build F one piece at a time: every piece after the first needs a constant of integration, chosen so the pieces match at each boundary. Write F(x)=0 below the range and F(x)=1 above it. For f(x)=1/5 on 0≤ x≤1 and f(x)=()/x5 on 1<x≤3, F(x)=(x²+1)/10 on the second piece.
- How do I find the median or a quartile from a cumulative distribution function?
- Solve F(x)=p with p=0.5 for the median, 0.25 for the lower quartile and 0.75 for the upper quartile. If F is piecewise, first find which piece holds the value by evaluating F at the boundaries, and solve in that piece only. Reject any root outside the range of that piece. For F(x)=x²/8 on 0≤ x≤2 and F(x)=()/x4 on 2<x≤4, the upper quartile is 3 and the interquartile range is 3-√2.
- Why do I lose marks on a cumulative distribution function?
- The most common error was omitting the constant of integration in the second part of a cumulative distribution function. Students also wrote "F(x)=0 otherwise" instead of giving F(x)=0 below the range and F(x)=1 above it. For Y=X², writing P(X²≤ y)=P(X≤ y) loses the square root, so the cumulative distribution function of Y is wrong.