The cumulative distribution function for a continuous random variable X with pdf f(x) is F(x)=P(X≤x)=∫−∞xf(y)dy.
Ex.X follows unif(A,B). Find the cdf of X.f(x)F(x)={B−A10x∈[A,B]otherwise=⎩⎪⎪⎨⎪⎪⎧0∫−∞xf(y)dy=∫Axf(y)dy=B−AX−A∫−∞xf(y)dy=∫ABf(y)dy=1x≤AA≤X≤Bx≥B
Properties
F(x) is the total area under f(y) to the left of x.
Since f(y)≥0, we know F(x) is non-decreasing.
0≤F(x)≤1.
Proposition. Given the pdf f(x) and the cdf F(x) of a continuous RV X, then: P(X>a)=1−P(X≤a)=1−F(a)P(a≤X≤b)=P(X≤b)−P(X≤a)=F(b)−F(a) Remember that since we’re dealing with continuous functions now, the edge cases of X=a and X=b don’t affect the cdf like they do for discrete variables.
Proposition. From the fundamental theorem of calculus, we have f(x)=dxdF(x). Thus you can calculate a pdf given a cdf and vice-versa.
Percentiles of a Continuous Distribution
In some cases we want to solve the inverse problem of finding the cdf F(x) – that is, given p, we want to find a such that P(X≤a)=F(a)=p.
Definition. Given 0≤p≤1, the (100p)th percentile of X, denoted as η(p), satisfies p=F(η(p))=∫−∞η(p)f(x)dx.
Ex. The pdf of X is f(x)={81+83x00≤x≤2otherwise and its cdf is F(X)=⎩⎪⎪⎨⎪⎪⎧08x+163x21x≤00≤x≤2x>2
Given p=161 find η(p). F(η(p))8η(p)+163η(p)2η(p)η(p)=161=161=−1 or 31=31.
Median
Definition. For p=0.5, we call η(0.5) the median, denoted by μ~. By definition, F(μ~)=0.5.
Remark.μ=μ~ when the pdf being studied is symmetric; i.e. f(μ~+x)=f(μ~−x) for all x.
For instance, if X follows unif(A,B), μ~=μ=2A+B.
Expected Value
Definition. The expected value of a continuous random variable X with pdf f(x) is μ=μX=E(X)=∫−∞∞xf(x)dx.
Ex.X follows unif(A,B). E(X)=∫ABx⋅B−A1dx=B−A1⋅2B2−A2=2(B−A)(B+A)(B−A)=2B+A. This result is in line with our remark about the median of random variables with symmetric pdfs.
Proposition. If X is a continuous RV with pdf f(x), then the expected value of h(X) is μh(X)=E(h(X))=∫−∞∞h(x)f(x)dx.
Definition. The variance of a continuous random variable X with pdf f(x) and expected value μ is σX2=V(X)=∫−∞∞(x−μ)2f(x)dx=E((X−μ)2).
The standard deviation (SD) of X is σX=V(X).
Proposition.V(X)=E(X2)−[E(X)]2, exactly the same property as with discrete RVs.