Вы находитесь на странице: 1из 3

Math 2140 Lecture 6 and 7 Discrete Random Variables

Consider 2 experiments:

i) Toss a fair die twice and find the probability that the sum of the scores is 8.
ii) Toss a fair coin 10 times and find the probability of obtaining 7 heads.

In the above egs, there is no interest in the actual outcomes of the events but in some function of
the outcome. These real-valued functions are called random variables.

Definition 1 A random variable (r.v.) is a function which maps the outcomes of a statistical
experiment into the set of real numbers.

There are two types of r.v.s.

(i) Discrete Range is finite/ countable infinite.


(ii) Continuous Range is an interval of the real line.

Note: Interval-valued variables (continuous r.v.s), Ordinal variables, Categorical variables


(qualitative/quantitative) Lecture Notes: Pg 39.

Consider examples of discrete r.v.s:

1) Toss 2 dice. Let X be the sum of the scores range of X is a finite no. of values e.g. X =
2, 3, ... , 12.

2) Toss a coin repeatedly until first head is obtained. Let X be the no. of tosses required
range of X is infinite but countable values in this set e.g. X = 1, 2, 3, 4, 5,....

For a discrete r.v. X, determine probability P(X=x) for every value x of X.

Definiton 2: The probability function (pf.), f is so obtained where

f(x) = P(X=x) for each x in the range of X.

Definition 3: The distribution function (or Cumulative Distribution Function) (df. or cdf.),
F of X is

F(x) = P(Xx) for each x in the range of X.

= tx f(t)

Examples : (1) Toss a biased coin where P(Head) = 2/3. Determine the pf. f and the df. F.

(2) Toss a fair die twice. Determine the pf. f for the sum of the scores.
(3) Toss a biased coin where the P(Head) = p repeatedly until the first head is obtained.
Determine the probability function f for the number of tosses required.

(4) Given that the probabilities corresponding to the values of a discrete r.v. X from 0 to 5 are
0.1, 0.2, 0.3, 0.1, 0.25 and 0.05, construct a table representing the pf. f and the df. F.

Theorem 1: Let X be a discrete r.v. with pf. f and df. F. Then:

a) If f is a pf. : (i) 0 f(x)1 and (ii) all x f(x) = 1.

b) If F is a df. : (i) 0F(x)1 , (ii) F is non-decreasing, (iii) limx F(x) 1 and

limx- F(x) 0.

Expected value of X - Mean of X

Consider the arithmetic mean and weighted mean of a set of observations 2,2,3,3,3,4,4,4. The
arithmetic mean, x = (2+2+3+3+3+4+4+4)/8 = 25/8. The weighted mean, x = {(2*2) + (3*3) +
(4*3)}/8 = [(2/8)*3] + [(3/8)*3] + [(3/8)*4] sum of the observations multiplied by the
corresponding proportions i.e. x = xipi.

Definition 4: Let X be a discrete r.v. with pf. f. Then the mean of X, or E(X), is

X E(X) = xf(x).

Eg. Given that a discrete r.v. X takes the values 0,1,2,3,4 with corresponding probabilities 0.3,
0.2, 0.3 and 0.2 respectively, calculate the expectation of X.

Theorem 2: Let X be a discrete r.v. with pf. f and finite mean . Then,

i) E(b) = b for any constant b.

ii) E(aX) = aE(X).

iii) E(X+b) = E(X) = b.

Proof: See Lecture notes pg 42.

Definition 5: Mean of a function of a r.v. -If g is a real-valued function and X is a r.v., then
g(X) is also a r.v.

Theorem 3: E[g(X)] = x g(x)f(x)

Definition 6: Moments of a r.v.- Let X be a r.v. with pf. f. Then the rth. moment of X, (r1), is
defined to be r = E(Xr).

Note: Mean of a r.v. does NOT always exist. See e.g. on pg 42. Lecture Notes.
Variance

For a sample of observations x1, x2,..., xn , the arithmetic mean is defined to be .


For different sets of observations with the same mean, this measure does not completely describe
the dataset since it does not give an idea of the spread of the observations from each other. A
measure of the spread or dispersion among observations is known as the sample variance. It
considers the deviation of each observation from the mean, i.e. (xi - ). The simplest form is sn2 =

Variance of a random variable X

Similar to the above idea, the variance of a r.v. X can be defined as follows:

Definition 1: Let X be a discrete r.v. with pf. f, finite mean and finite second moment E(X2).
Then, the variance, Var(X) or defined to be:

Var(X) = E[(X- )2]

Theorem 1: Var(X) = E(X2) [E(X)]2

Proof: See Lecture notes pg 43.

Theorem 2: Let X be a discrete r.v. with finite mean and variance var(X) or , then:

i) Var(X+b) = Var(X) for any constant b.


ii) Var (aX) = a2Var(X)

Proof: See Lecture notes.

Corollary: Var(aX+b) = a2Var(X).

Definition 2: Let X be a r.v. with pf. f and finite mean .

i) The rth. moment of X is r = E( for any positive integer r.


ii) The rth. central moment (r 1) is E[(X- )r].

Example: Given the following pf f where:

X=x 0 1 2 3 4

f(x) = P(X=x) 0.5 0.3 0.1 0.05 0.05

Calculate (i) E(X) and (ii) Var(4X+3).

Note: See other examples in Lecture notes pg 44 and 45.

Вам также может понравиться