4.1 Continuous random variables
- Syllabus
- 9231–2028–2029
- Topic
- 4.1
- Level
- A2
Aprobabilitydensityfunctionsatisfiesf(x)\ge0,\qquad \int_{-\infty}^{\infty}f(x),dx=1.Probabilitiesareareas:P(a<X<b)=\int_a^b f(x),dx.ForapiecewisePDF,spliteveryintegralateachbranchboundary.
Supposef(x)=\begin{cases}kx,&0\le x<1,\k(2-x),&1\le x\le2,\0,&\text{otherwise}.\end{cases}Normalizationgives1=k\int_0^1x,dx+k\int_1^2(2-x),dx=\frac{k}{2}+\frac{k}{2},so $k=1$.
Usingthesecondbranch,P(X>1.5)=\int_{1.5}^{2}(2-x),dx=0.125.If an interval crossed $x=1$, its probability would be the sum of two integrals, one from each branch.
A density value f(x) is not P(X=x); for a continuous variable P(X=x)=0. The formulas need not be continuous at a branch join unless other conditions impose continuity, but the PDF must remain non-negative and normalized.
If continuous $X$ has PDF $f$, then for a function $g$,E[g(X)]=\int_{-\infty}^{\infty}g(x)f(x),dx,integratedovertheactualsupport.ImportantcasesareE[X]=\int xf(x),dx,\qquad E[X^2]=\int x^2f(x),dx,and $\operatorname{Var}(X)=E[X^2]-E[X]^2$.
For $f(x)=2x$ on $0\le x\le1$,E[X]=\int_0^1 2x^2,dx=\frac23,andE[X^2]=\int_0^1 2x^3,dx=\frac12.Therefore\operatorname{Var}(X)=\frac12-\left(\frac23\right)^2=\frac1{18}.
For any requested transformation, replace g(x) directly inside the integral. For example, E[(3X-1) squared] uses g(x)=(3x-1) squared; it does not require first finding the distribution of 3X-1.
This is a continuous integral, not a discrete sum. Do not omit f(x), and do not assume E[g(X)]=g(E[X]); that equality fails for most nonlinear g.
For continuous $X$,F(x)=P(X\le x)=\int_{-\infty}^{x}f(t),dt.Hence, where differentiable, $f(x)=F'(x)$, andP(a<X\le b)=F(b)-F(a).A percentile $q_p$ satisfies $F(q_p)=p$.
A CDF is non-decreasing, right-continuous, tends to 0 as x tends to negative infinity and tends to 1 as x tends to positive infinity. For a bounded continuous PDF, write the outside-support CDF branches explicitly as 0 and 1.
If $f(x)=2x$ on $0\le x\le1$, then $F(x)=x^2$ on that interval. ThusP(0.2<X\le0.8)=0.8^2-0.2^2=0.60.The 75th percentile solves $q^2=0.75$, soq_{0.75}=\sqrt{0.75}.
A PDF height is not a probability and a percentile solves F(q)=p, not f(q)=p. For continuous X, endpoint choices do not change an interval probability because P(X=x)=0.
For $Y=h(X)$, begin withF_Y(y)=P(Y\le y)=P(h(X)\le y).Translate this inequality into an event for $X$, using monotonicity and the support. Substitute into $F_X$, state the transformed support, then differentiate to obtain $f_Y(y)=F_Y'(y)$.
Let $f_X(x)=2x$ for $0\le x\le1$, so $F_X(x)=x^2$ there, and set $Y=X^3$. For $0\le y\le1$,F_Y(y)=P(X^3\le y)=P(X\le y^{1/3})=F_X(y^{1/3})=y^{2/3}.
ThereforeF_Y(y)=\begin{cases}0,&y<0,\y^{2/3},&0\le y\le1,\1,&y>1,\end{cases}and on $0<y<1$,f_Y(y)=\frac{d}{dy}y^{2/3}=\frac23y^{-1/3}.Its improper integral over $(0,1)$ is one.
Do not substitute y cubed into F_X: the event requires the inverse transformation, here the cube root. If h is decreasing, the inequality reverses; if it is not one-to-one on the support, split the event into all contributing branches.