- same idea as the discrete case, the sum over the mass becomes an integral over the density fX
E(X)=∫−∞∞xfX(x)dx
- recipe: find the pdf, integrate xfX(x) over the support ( where fX>0 )
- any function works the same way: E(g(X))=∫g(x)fX(x)dx
- two variables use the joint density and a double integral: E(g(X,Y))=∬g(x,y)fX,Y(x,y)dxdy
- example: fX(x)=10003x2 on 0≤x≤10
E(X)=∫01010003x3dx=100034x4010=7.5
- example: fX(x)=3e−3x for x≥0, an exponential with λ=3
- E(X)=∫0∞3xe−3xdx=31 ( by parts, or just 1/λ )