- #1
toothpaste666
- 516
- 20
Homework Statement
find μ and σ^2 for the following probability density
f(x) = x for 0<x<1
f(x) = 2-x for 1 <= x < 2
f(x) = 0 elsewhere
Homework Equations
μ = ∫xf(x)dx
σ^2 = ∫x^2 f(x)dx - μ^2
The Attempt at a Solution
first we find the mean. we split up the integral into sums of different integrals
since f(x) = 0 from -∞ to 0 and from 2 to ∞ we have
μ = ∫(0to1)x^2dx + ∫(1to2)x(2-x)dx
= ∫x^2dx + ∫2xdx - ∫x^2dx
where the first integral is from 0 to 1 and the others are from 1 to 2
= (1/3)x^3|(0to1) + x^2|(1to2) - (1/3)x^3|(1to2)
= 1/3 + (4-1) - (8/3-1/3) = 1/3 + 3 -7/3 = 3-6/3 = 3-2 = 1
so the mean is 1. now to find the variance
σ^2 = ∫x^3dx + ∫x^2(2-x)dx - 1^2
= ∫x^3dx + ∫2x^2dx - ∫x^3dx - 1
= (1/4)x^4|(0to1) + (2/3)x^3|(1to2) - (1/4)x^4|(1to2) - 1
= 1/4 + (16/3-2/3) - (16/4-1/4) - 1
= 1/4 + 14/3 - 15/4 - 1
= 1.667
am i doing this correctly?