Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
12 views

Random Variables

Describe

Uploaded by

gjct2bxm6y
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Random Variables

Describe

Uploaded by

gjct2bxm6y
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 41

RANDOM VARIABLES

A random variable associates a numerical value with each outcome of an experiment. A random

variable is defined mathematically as a real-valued function defined on a sample space, and is

denoted by a letter such as X or Y or Z.


Example 1: For the experiment of flipping a coin twice, the random variable X is
defined to be the number of tails to appear when the experiment is performed.
The random variable Y is defined to be the number of heads to appear when
experiment is performed.
Solution
Sample space or outcome Value of X Value of Y

HH 0 2

HT 1 1

TH 1 1

TT 2 0
Example 2: A balance coin is tossed 4 times. List the element of the sample space
and the random variable X consisting of the total number of heads.
Solution
If H and T stand for head and tail respectively, the result is as shown below:
Element of sample space Value of X Probability
HHHH 4 1/16
HHHT 3 1/16
HHTH 3 1/16
HTHH 3 1/16
THHH 3 1/16
HHTT 2 1/16
HTHT 2 1/16
HTTH 2 1/16
THHT 2 1/16
THTH 2 1/16
TTHH 2 1/16
HTTT 1 1/16
THTT 1 1/16
TTTH 1 1/16
TTHT 1 1/16
TTTT 0 1/16
Random variable X Frequency
0 1
1 4
2 6
3 4
4 1

A random variable X is said to be discrete if the range of X is countable i.e X has a


finite number say x1, x2, etc.

• CONTINUOUS RANDOM VARIABLE


• A random variable is a continuous random variable if it is capable of assuming all
the values in an interval or in several intervals.
DISCRETE PROBABILITY DISTRIBUTION
A table or a formula listing all possible values of a discrete random variable with
the associated probability is called discrete probability distribution or simply a
probability distribution.
If X is a discrete random variable, the function given by f(x)=P(x=x), for each within
the range of X and must satisfy these two conditions:
i. F(x)
ii. f(x) = 1
Is called the probability function or the probability distribution function.
Example 1: find the probability distribution of the sum of the number obtained
when a pair of die is tossed.
Solution
Let X be a random variable which is the sum of the number obtained, then can
be integer between 2 and 12.
Two dies can fall in 36 ways, each with probability of therefore, the probability
distribution is as follows
1 2 3 4 5 6
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12

X 2 3 4 5 6 7 8 9 10 11 12

P(x=x)

The table above gives the probability distribution of X


Example 2: check whether the function given by f(x) = , where x = 1,2,3,4 is a
probability function and construct a probability distribution for the function.
Solution
F(x) = if x = 1,2,3,4
F(1) = = 0.1; f(2) = = 0.2; f(3) = = 0.3; f(4) = = 0.4
F(1) + f(2) + f(3) + f(3) = 0.1 + 0.2 + 0.3 + 0.4 =1
F(x) 0
Since, the two conditions are satisfied then the function is probability
function.

X 1 2 3 4

F(x)
Exercise 1: check whether the function given by f(x) = , where x = 1,2,3,4,5 can
serve as a the probability function of a random variable and if so construct a
probability distribution for the function.
2. It is known from a census data for a particular income group that 10% of
households have no children, 25% have one child, 50% have two children, 10%
have three children and 5% have four children.
If X represent the number of children per household for this income group.
Construct a probability:
i. The probability that a household has at least two children.
ii. The event that a household has at most one child
iii. The probability that a household has between one and three children.
MEAN OF A DISCRETE RANDOM VARIABLE
The mean of a discrete random variable is given by
=Σ x P(x) where the sum is over all values of X
The mean of a discrete random variable is also called the expected value, and is
represented by E (X).
Example: The mean of the random variable in example 1 is found as follows:
x 2 3 4 5 6 7 8 9 10 11 12

P(x=x) 0.028 0.056 0.083 0.111 0.139 0.167 0.139 0.111 0.083 0.056 0.028

xPx 0.056 0.168 0.0332 0.555 0.834 1.169 1.112 0.999 0.830 0.616 0.336
The sum of the row labelled xP(x) is the mean of X and is equal to
7.007.
E(x) 7
Exercise: Find the mean of children per household for the distribution.
STANDARD DEVIATION OF A DISCRETE
RANDOM VARIABLE
The variation of a discrete random variable is represented by σ2 and is
defined by
σ2 = (x - )2 P(x)
The variance is also represented by Var (X) and may be calculated by
the alternative formula given by
Var (X) = σ2 = x2 P(x) – 2
The standard deviation of a discrete random variable is represented
by σ or sd (X) and is given by
σ = sd(X) = Var (X)
BINOMIAL RANDOM VARIABLE
/DISTRIBUTION
A binomial random variable is a discrete random variable that is defined
when the conditions of a binomial experiment are satisfied. The conditions
are:
i. There are n identical trials
ii. Each trials has only two possible outcomes
iii. The probability of the two outcomes remain constant for each trial
iv. The trial are independent
The two outcomes possible on each trial are called success and failure.
Their probabilities are respectively p and q and p + q = 1

When the conditions of the binomial experiment are satisfied, the


binomial random variable X is defined to equal the number of successes
to occur in the n trials. The random variable X may assume any of the
whole numbers from zero to n.
BINOMIAL PROBABILITY FORMULA
• If p is the probability that an event will happen and q is the probability that the event
will not happen, then the probabilities that the event will happen 0, 1, 2, 3, . . . , n
times
in n trials are given by the successive terms of the expansion of , taken
from left to right’.

The binomial probability formula is used to compute probabilities for binomial random
variables. The formula is given by
p(x) = =
For x = 0, 1, 2,…,n
• Example: Determine the probabilities of having (a) at least 1 girl and (b)
at least 1 girl and 1 boy in a family of 4 children, assuming equal
probability of male and female birth.

• Solution
• The probability of a girl being born, p, is 0.5 and the probability of a girl
not being born (male birth), q, is also 0.5. The number in the family, n, is
4.

• From above, the probabilities of 0, 1, 2, 3, 4 girls in a family of 4 are given


by the successive terms of the expansion of taken from left to right.
• From the binomial expansion:
=

- Hence the probability of no girls is i.e. = 0.0625


- the probability of 1 girl is , i.e. 4 × × 0.5 = 0.2500
- the probability of 2 girls is , i.e. 6 × × = 0.3750
- the probability of 3 girls is , i.e. 4 × 0.5 × = 0.2500
- the probability of 4 girls is , i.e. = 0.0625
- Total probability, = 1.0000
(a) The probability of having at least one girl is the sum of the
probabilities of having 1, 2, 3 and 4 girls, i.e.
0.2500 + 0.3750 + 0.2500 + 0.0625 = 0.9375

(Alternatively, the probability of having at least 1 girl is: 1 − (the


probability of having no girls), i.e.
1−0.0625, giving 0.9375, as obtained previously.)
(b) The probability of having at least 1 girl and 1 boy is given by the
sum of the probabilities of having: 1 girl and 3 boys, 2 girls and 2 boys
and 3 girls and 1 boy, i.e.
0.2500 + 0.3750 + 0.2500=0.8750
(Alternatively, this is also the probability of having 1 − (probability of
having no girls + probability of having no boys), i.e.
1−2×0.0625=0.8750, as obtained previously.)
Example 2: A dice is rolled 9 times. Find the probabilities of having a 4
upwards (a) 3 times and (b) less than 4 times.
Solution

Let p be the probability of having a 4 upwards.

Then p = 1/6, since dice have six sides.

Let q be the probability of not having a 4 upwards.


Then q=5/6.
The probabilities of having a 4 upwards 0, 1, 2, . . . , n times are given
by the successive terms of the expansion of , taken from
left to right. From the binomial expansion:

• The probability of having a 4 upwards no times ( zero times) is


• = = 0.1938
The probability of having a 4 upwards once is
= 9() = 0.3489

The probability of having a 4 upwards twice is


= 36 = 0.2791

The probability of having a 4 upwards 3 times is


• = 84= 0.1302
(a) The probability of having a 4 upwards 3 times is 0.1302.

(b) The probability of having a 4 upwards less than 4 times is the sum
of the probabilities of having a 4 upwards 0, 1, 2, and 3 times, i.e.

0.1938 + 0.3489 + 0.2791 + 0.1302 = 0.9520


Example: it is known that 20% of each person given a certain
medication always get drowsy within 2 minutes. Find the probability
that among 14persons given the medication:
i. At most 2 will get very drowsy within 2 minutes.
ii. At least 5 will get very drowsy within 2 minutes.
iii. 2, 3 or 4 will get drowsy within 2 minutes
Solution
P = = 0.2
Probability of success, that each person will get drowsy is 0.2 and q
= failure ( i.e they will not get drowsy) = 0.8
P+q=1 i.e 0.2 + q = 1
= q = 0.8
Using the formula
p(x) = =
i. At most 2 will get drowsy is P(x 2) = P (x = 0,1,2)
n = 14, p = 0.2, q = 0.8, x = 0,1,2
= 0.448
ii. At least 5 will get drowsy is P (x 5)
p (x = 5, ,6, 7, 8, 9, 10, 11, 12, 13, 14
iii. P(x = 2,3 or 4)
• Example: Fifty-seven percent of companies in the U.S. use networking
to recruit workers. The probability that in a survey of ten companies
exactly half of them use networking to recruit workers is:

• Solution
• P(5) = = 0.223
TABLES OF THE BINOMIAL
DISTRIBUTION
• Appendix 1 (Schaum’s series page 359) contains the table of binomial
probabilities. This table lists the probabilities of x for n = 1 to n = 25
for selected values of p.
MEAN AND STANDARD DEVIATION
OF A BINOMIAL RANDOM VARIABLE
• The mean of a binomial random variable is given by:
= np
• The variance of a binomial random variable is given by:
npq
• Example : If X represents the number of girls in families having four
children, then X is a binomial random variable with n = 4 and p = 0.5
• The distribution of X is determimed by the formula
P(0) = = 0.0625, P(1)= = 0.25
P(2)= = 0.375, P(3) = = 0.25
P(4) = = 0.0625
• The mean of the above example is:
0 x 0 .0625 + 1 x .25 + 2 x 0.375 + 3 x .25 + 4 x .0625 =2

The mean using the shortcut formula is:


= np
= 4x 0.5 =2
• The variance for the binomial distribution is given by:
• σ2 = x2 P(x) – 2
= (0 x .0625 + 1 x .25 + 4 x .375 + 9 x .25 + 16 x .0625) - 4 = 1

• The variance using the shortcut formula:


npq
= 4 x 0.5 x0.5
=1
• Example: Chemotherapy provides a 5-year survival rate of 80% for a
particular type of cancer. In a group of 20 cancer patients receiving
chemotherapy for this type of cancer, the mean number surviving
after 5 years is = 20 x .8 = 16 and the standard deviation is
= 1.8.
On the average, 16 patients will survive, and typically the number will
vary by no more than two from this figure.
POISSON RANDOM VARIABLE/
DISTRIBUTION
The binomial random variable is applicable when counting the number of occurrences of
an event called success in a finite number of trials. When the number of trials is large or
potentially infinite, another random variable called the Poisson random variable may be
appropriate.

Poisson probability distribution is applied to experiments with random and independent


occurrences of an event.

The occurrences are considered with respect to a time interval, a length interval, a fixed
area or a particular volume.
• When the number of trials, n, in a binomial distribution becomes
large (usually taken as larger than 10), the calculations associated
with determining the values of the terms becomes laborious. If n is
large and p is small, and the product np is less than 5, a very good
approximation to a binomial distribution is given by the
corresponding Poisson distribution, in which calculations are usually
simpler.
• The principal use of a Poisson distribution is to determine the
theoretical probabilities when p, the probability of an event
happening, is known, but q, the probability of the event not
happening is unknown. For example, the average number of goals
scored per match by a football team can be calculated, but it is not
possible to quantify the number of goals which were not scored.
Poisson probability formula:
A random variable x has a poisson distribution if its probability
distribution is given by

for x=0,1,2,…

Where = is the mean number of occurrences of the event in the interval.


e = 2.71828
MEAN AND VARIANCE OF POISSON
RANDOM VARIABLE
• The mean of a Poisson random variable is given by:
=

• The symbol λ is the expectation of an event happening and is equal to


np.

• The variance of a Poisson random variable is given by:


σ2 =
Example: The number of small pin holes in sheets of a plastic are of concern to a
manufacturer. If the number of pin holes is too large, the plastic is unusable. The
mean number per square yard is equal to 2.5. the 1-yd2 sheets are unusable if the
number of pinholes exceeds 6. the probability of interest is P (X 6), where X
represents the number of pinholes in a 1-yd2 sheet.

The probability is found by finding the probability of the complementary event and
subtracting it from 1
i.e P (X 6) = 1 – P (X 6)

P(X 6) = 1 - P (X 6) = 1 – 0.9858 = 0.0142


By multiplying 0.0142 by 100, we see that 1.42% of the plastic sheet are unusable.
Exercise
The number of loan application that a bank get per day is having a
poisson distribution with the mean = 7.5.
Find the probability that any given day, the bank will get:
i. Exactly 6 loan application
ii. At most 4 loan application
iii. At least 8 loan application
iv. Any where from 5 to 10 loan application

You might also like