Skip to main content

Section 5.3 Probability Functions

In the formulas below, we will presume that we have a random variable 5.2.1 X which maps the sample space S onto some range of real numbers R. From this set, we then can define a probability function f(x) which acts on the numerical values in R and returns another real number. We attempt to do so to obtain (for discrete values) P(sample space value s)=f(X(s)). That is, the probability of a given outcome s is equal to the composition which takes s to a numerical value x which is then plugged into f to get the same final values.
For example, consider a random variable which assigns a 1 when you roll a 1 on a six-sided die and 0 otherwise. Presuming each side is equally likely, f(1)=16 and f(0)=56.

Definition 5.3.1. Probability "Mass" Function.

Given a discrete random variable 5.2.1 X on a space R, a probability mass function on X is given by a function f:RR such that:
xR,f(x)>0xRf(x)=1ARP(XA)=xAf(x)
For xR, you can use the convention f(x)=0.

Definition 5.3.2. Probability "Density" Function.

Given a continuous random variable X on a space R, a probability density function on X is given by a function f:RR such that:
xR,f(x)>0Rf(x)dx=1ARP(XA)=Af(x)dx
For xR, you can use the convention f(x)=0.
For the purposes of this book, we will use the term "Probability Function" to refer to either of these options.
Consider f(x)=x/10 over R = {1,2,3,4}. Then, f(x) is obviously positive for each of the values in R and certainly
xRf(x)=f(1)+f(2)+f(3)+f(4)=1/10+2/10+3/10+4/10=1.
Therefore, f(x) is a probability mass function over the space R.
Consider f(x)=x2/c for some positive real number c and presume R = [-1,2]. Then f(x) is nonnegative (and only equals zero at one point). To make f(x) a probability density function 5.3.2, we must have
xRf(x)dx=1.
In this instance you get
1=12x2/c=x33c|12dx=83c13c=3c
Therefore, f(x) is a probability density function over R provided c=3.

Definition 5.3.5. Distribution Function.

Given a random variable X on a space R, a probability distribution function on X is given by a function
F:RRF(x)=P(Xx).
Using f(x)=x/10 over R = {1,2,3,4} again, note that F(x) will only change at these four domain values. We get
Table 5.3.7. Discrete Distribution Function Example
X F(x)
x<1 0
1x<2 1/10
2x<3 3/10
3x<4 6/10
4x 1
Consider f(x)=x2/3 over R = [-1,2]. Then, for 1x2,
F(x)=1xu2/3du=x3/9+1/9.
Notice, F(1)=0 since nothing has yet been accumulated over values smaller than -1 and F(2)=1 since by that time everything has been accumulated. In summary:
Table 5.3.9. Continuous Distribution Function Example
X F(x)
x<1 0
1x<2 x3/9+1/9
2x 1
Let a = inf(R). Then, for x<a,
F(x)=P(Xx)P(X<a)=0
since none of the x-values in this range are in R.
Let b = sup(R). Then, for xb,
F(x)=P(Xx)=P(Xb)+P(b<Xx)=P(Xb)=1
since all of the x-values in this range are in R and therefore will either sum over or integrate over all of R.
Case 1: R discrete
x1,x2Zx1<x2F(x2)=xx2f(x)=xx1f(x)+x1<xx2f(x)xx1f(x)=F(x1)
Case 2: R continuous
x1,x2Rx1<x2F(x2)=x2f(x)dx=x1f(x)dx+x1x2f(x)dxx1f(x)dx=F(x1)
Assume xR for some discrete R. Then,
F(x)F(x1)=uxf(u)u<xf(u)=f(x)
For a and b as noted, consider
F(b)F(a)=bf(x)dxaf(x)dx=abf(x)dx=P(a<xb)
We will assume that F(x) is a continuous function. With that assumption, note
P(aϵ<xa)=aϵaf(x)dx=F(a)F(aϵ)
Take the limit as ϵ0+ to get the result.
Assume X is continuous and f and F as above. Notice, by the definition of f, limx±f(x)=0 since otherwise the integral over the entire space could not be finite.
Now, let A(x) be any antiderivative of f(x). Then, by the Fundamental Theorem of Calculus,
F(x)=xf(u)du=A(x)limuA(u)
Hence, F(x)=A(x)limuA(u)=f(x) as desired.

Definition 5.3.17. Percentiles for Random Variables.

For 0<p<1, the 100pth percentile is the largest random variable value c that satisfies
F(c)=p.
For continuous random variables over an interval R=[a,b], you will solve for c in the equation
acf(x)dx.
For discrete random variables, it is unlikely that a particular percentile will land exactly on one of the elements of R but you will want to take the smallest value in R so that F(c)p.
The 50th percentile (as before) is also known as the median.
For our earlier example with f(x)=x2/3 on R = [-1,2], the 50th percentile (i.e. the median) is found by starting with p = 0.5 and then solving
F(c)=0.5
or
c3/9+1/9=1/2
or
c3+1=9/2.
After solving for c, you find
median=7/231.518.
TBA, using one of the table examples from above.