Basic Terms and Concepts: Random Experiment An experiment

Basic Terms and Concepts:
Random Experiment
An experiment where the results depend on chance
e.g. Drawing the numbers for LOTTO
A Trial
One performance of the experiment
e.g. One ball is drawn
Outcome
The result of the experiment
e.g. The ball is a ‘4’
Sample Space
The list of all of the possible outcomes
e.g. {1, 2, 3, 4, …, 40}
Event
Is part of the sample space
e.g. Selecting the numbers 5, 8, 11, 15, 22, 30 in LOTTO
Long Run Relative Frequency
This can be obtained when a large number of trials are performed
e.g. A coin is tossed 100 times and 48 heads occur
Probability = number of favourable outcomes = 48
total number of trials
100
Equally Likely Outcomes
When outcomes are equally likely.
number of elements in event
Probability =
number of elements in the sample space
The probability of an event is a number between 0 and 1
A Probability Distribution Table lists all of the outcomes and their
associated probabilities. In a probability distribution table the sum of the
probabilities always equals 1.
A random variable is a variable whose value is determined by the
outcome of a random experiment.
X is used for the random variable, x is used for any values that it takes.
e.g. Ten seeds are planted. A random variable might count the number of
seeds that germinate.
X = random variable, x = 0,1,2,3,4,5,6,7,8,9,10 represents the values
that it can take.
P(X = x) could have P(X = 2) = “the probability that 2 germinate”
e.g. Tossing two dice could yield random variables
i) A = “the number of twos occurring” a = {0,1,2}
ii) B = “the sum of the result” b = {2,3,4,5,6,7,8,9,10,11,12}
Properties of a Sample Space
1.
2.
3.
4.
P(Ø) = 0, the probability of nothing is 0
P(S) = 1, the probability of all happening is 1
0 ≤ P(A) ≤ 1, the prob. for any event A is always between 0 and 1
P(A’) = 1 – P(A), prob. A not occurring is 1 – prob A occurs
Or P(A’) + P(A) = 1
A’ is the complement of A
e.g. A coin is tossed twice – what is the prob. that at least one head
occurs?
S = (HH, HT, TH, TT)
E = (HT, TH, HH)
P(E) = ¾
Or P(at least one head) = 1 – P(no head) = 1 – ¼ = ¾
e.g. A loaded die is such that an even number is twice as likely to occur
as an odd number. Find the probability that a number less than a 4 appears
in a single toss.
S = (1, 2, 3, 4, 5, 6)
E = (1, 2, 3)
Let w = P(odd no.) then 2w = P(even no.)
So w + 2w + w + 2w + w + 2w = 1
P(E) = 1/9 + 2/9 + 1/9 = 4/9
9w = 1
w = 1/9
Tree Diagrams
- also can be used when sampling without replacement. This is when the
second event is dependant upon what happened in the first event.
e.g. A uni student brought 10 unlabelled cans of food. He knows that 5 of
the 10 are sweetcorn, while the other 5 are baked beans. What is the
probability that two of the first three cans selected contain sweetcorn?
S
3/8
S
4/9
5/10
5/10
S
S'
S
5/8
4/8
S'
5/9
5/9
S'
4/8
4/8
S'
S
4/9
S'
S
4/8
5/8
P(2 of 3 cans are sweetcorn) =
5/10 × 4/9 × 5/8 + 5/10 × 5/9 × 4/8 +
5/10 × 5/9 × 4/8
= 5/12
S'
S
3/8
S'
Venn Diagrams
- diagrams that allow us to explain the relationship between events.
A
B
1.
A  B - A intersection B (in A and B)
2.
A  B - A union B (in A or B)
3.
A' - A complement (not in A)
S
A'
A
e.g.
A
B
0.3
0.15
0.2
1.
2.
3.
4.
P(A) = 0.3 + 0.15 = 0.45
P(B) = 0.2 + 0.15 = 0.35
P(A  B) = 0.15
P(A  B) = 0.3 + 0.2 + 0.15 =
0.65
5. P(A ' ) = 1 – 0.45 = 0.55
0.35
Probability Rule
P(A  B) = P(A) + P(B) – P(A  B)
i.e. the probability of being in A or B is the prob. of being in A + the prob.
of being in B – the prob. of being in both. (when you count the prob. in A
then B you count the intersection twice – hence subtract one lot of the
intersection)
e.g. The prob. that a student passes Math is 2/3 and the prob. she passes
English is 4/9. If the prob. of passing at least one course is 4/5, what is the
prob. that she passes both courses?
P( M  E) = P( M) + P( E) – P( M  E)
4 2 4
= + – P( M  E)
5 3 9
14
P( M  E) =
45
Special Events
1.
Complementary Event
Two events which exhaust the sample space.
A and A’ are complementary events and
P(A) + P(A’) = 1
e.g. A coin is tossed twice. What is the probability that at least one head
occurs? The complementary events are: that at least one head
occurs or no heads occur.
P(at least one head occurs) = 3/4
P(no heads occur) = 1/4
P(at least one head occurs) + P(no heads occur) = 1
or P(at least one head occurs) = 1 – P(no heads occur)
e.g. A coin is tossed 6 times in succession (26 = 64 outcomes)
What is the prob. that at least one head occurs?
Let E = at least one head occurs, E’ = no heads occur
P(E) = 1 – P(E’) = 1 – 1/64
= 63/64
2.
Mutually Exclusive Events
Two events are mutually exclusive if they cannot both happen at the same
time. There is no intersection on the venn diagram. The prob. that both
occur is zero.
The prob. that A or B occurs: P(A  B) = P(A) + P(B) as P(A  B) = 0
e.g. A = Sally won the tennis final last Saturday
B = Sally was runner up in the tennis final last Saturday.
e.g. C = the sum of two dice is 11
D = one of the dice shows a 3
e.g. What is the prob. of getting a total of 7 or 11 when two dice are
thrown?
They can’t both happen so we add the prob. of getting a 7 to the
prob. of getting 11.
Let X = the sum of the two dice.
P(X = 7) = 6/36 P(X = 11) = 2/36 P(X = 7 or 11) = 6/36 + 2/36 = 2/9
3.
Independent Events
Two events which have no bearing on each other are said to be
independent i.e. the outcome of one event is not going to influence the
outcome of the other.
If A and B are independent events: P(A  B) = P(A)  P(B)
e.g. A = a family has children of both sexes.
B = a family has at most one girl.
A and B are independent if a family has 3 children, not if it has 2
S2 = (gg, gb, bg, bb)
S3 = (ggg, ggb, gbg, bgg, gbb, bgb, bbg, bbb)
Family of 2: P(A) = 1/2 P(B) = 3/4 P(A  B) = 1/2 P(A) x P(B) = 3/8
Family of 3: P(A) = 3/4 P(B) = 1/2 P(A  B) = 3/8 P(A) x P(B) = 3/8
e.g. An athlete competes in two races. The prob. that he wins the 200m is
0.6, P(A) the prob. that he wins the 400m is 0.7, P(B) independently
of the result of the 200m. What is the prob. he wins:
a)
b)
c)
neither race P(A’) × P(B’) = 0.4 × 0.3 = 0.12
both races P(A) × P(B) = 0.6 × 0.7 = 0.42
just one race? P(A)×P(B’) + P(A’)×P(B) = 0.6 × 0.3 + 0.4 × 0.7 = 0.46
Let A = wins 200m, B = wins 400m
Conditional Probability
When probabilities are influenced by previous events
The conditional probability of B, given that A has already occurred is written
as P(B/A). The symbol / means ‘given’.
Using the probability tree to obtain a formula for conditional probability:
P(B/A)
P(A)
B
P(A  B) or P(B  A)
A
not B
B
not A
not B
P(A)  P(B/ A) = P(B  A)
Therefore the conditional probability formula is often written as:
P(A  B)
P(A / B) =
P(B)
Note: If events A and B are independent, the P(B/A) should equal P(B)!
e.g. The prob. that a married man watches a certain tv show is 0.4 and
the prob. that a married woman watches the show is 0.5. The prob.
that the man watches the show given his wife does is 0.7. Find the
prob. that:
P(A) = 0.4
P(B) = 0.5
P(A/B) = 0.7
Let A = Man watches show, B = wife watches.
a)
a married couple both watched the show
P( A  B) = P( A/ B)  P( B) = 0.7  0.5 = 0.35
b)
a wife watches the show if her husband does
P( B/ A) =
c)
P( A  B) 0.35
=
= 0.875
P( A)
0.4
at least one of the couple watches the show
P( A  B) = P( A) + P( B) – P( A  B) = 0.4 + 0.5 – 0.35 = 0.55
Expectation and Probability Distributions
This is the concept of the expected mean of a random variable. It is
closely related to the arithmetic mean or average.
x
n
 x = E(X) =
i=1
i
P(X = x i)
A table or formula listing all possible values that a discrete variable can
take on, together with associated probabilities is called a discrete
probability distribution
e.g. Calculate the expected value of X, E(X) where X denotes the
outcomes on a die.
x
1
2
3
4
5
6
P(X = x)
1/6
1/6
1/6
1/6
1/6
1/6
E(X) = 1×1/6 + 2×1/6 + 3×1/6 + 4×1/6 + 5×1/6 + 6×1/6 = 3.5
e.g. Find E(T) for the probability distribution for T, where T counts the sum
when 2 dice are thrown.
t
1
2
3
4
5
6
7
8
9
10 11 12
P(T=t) 0/36 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
E(T) = 1×0/36 + 2×1/36 + 3×2/36 + ... + 12×1/36 = 7
Note:
1.
The probability distribution lists all of the possible outcomes.
2.
The sum of the probabilities must be 1 if it is a probability distribution
Games of Chance
A fair price for a ticket in a lottery would be one which returned the same
amount from ticket sales as was distributed in prizes
Gain = payoff – entry price
e.g. In a gambling game a man is paid $5 if he gets all heads or all tails
when three coins are tossed, and he pays out $3 if either 1 or 2
heads occur. What is his expected gain?
x
P(X = x)
$5
1/4
-$3
3/4
E(X) = 5 × ¼ + -3 × ¾ = -1
Therefore: on average man will lose $1 per toss. Game is not fair.
Variance of a Random Variable
- gives us an indication of the spread of results every time we conduct the
experiment
- the variance is the average of the squared distances from the mean.
i.e. VAR(X) = E[(X –  )2]
The formula can be simplified to:
2
2
VAR(X) = E(X ) – [E(X)]
Note: to find E(X2) square all x-values and multiply by original probabilities.
e.g. Using the previous distribution tables, calculate VAR(X) for the die
experiment, and VAR(T) for the sum of two dice.
VAR(X) = 12×1/6 + 22×1/6 + 32×1/6 + 42×1/6 + 52×1/6 + 62×1/6 – (3.5)2
= 2.92 (2 d.p.)
VAR(T) = 12×0/36 + 22×1/36 + … + 112×2/36 + 122×1/36 – (7)2
= 5.83 (2 d.p.)
Note: The standard deviation is the square root of the variance
PROOF:

VAR(X) = E  (X – )

2









2
2


= E  X – 2X + 
=E X
=E X
=E X


2


2


2



– 2E(X) + E  
2


2
– 2(E(X)) + (E(X))
– (E(X))
2
2
Linear Functions of a Random Variable
Consider the random variable:
x
1
P(X = x)
0.2
2
0.3
3
0.4
4
0.1
VAR(X) = 6.6 – 2.42
= 0.84
E(X) = 2.4
Each data value is doubled then one is subtracted (i.e. 2X – 1). Calculate
the new expected mean and variance
x
P(X = x)
E(X) = 3.8
1
0.2
3
0.3
5
0.4
7
0.1
VAR(X) = 17.8 – 3.82
= 3.36
By taking the original mean and variance, we could have obtained the
same results by using:
E(aX + b) = aE(X) + b
2
VAR(aX + b) = a VAR(X)
where a and b are constants and VAR(b) = 0
i.e. E(X) = 2×2.4 – 1
VAR(X) = 22×0.84
= 3.8
= 3.36
Note: SD(aX) = aSD(X) as the standard deviation is the square root of the
variance
e.g. X is a random variable with mean 20 and variance 4. Find the mean
and standard deviation of:
the mean
the variance
the standard
(VAR)
deviation (SD)
X+2
22
4
2
3X
60
36
6
X–1
19
4
2
2X – 1
39
16
4
-X
-20
4
2
e.g. A soup recipe requires 1200mL of milk (available in two 600mL
cartons). The standard deviation of the volume of milk in a 600mL
carton is 3mL. Calculate the standard deviation of the total volume
purchased.
Let C = C1 + C2
VAR(C) = VAR(C1 + C2)
= VAR(C1) + VAR(C2)
= 32 + 32
= 18
Therefore standard deviation = √18
Note: treat as separate containers C1 and C2 not 2C
PROOF (see workbook)
Sums of Random Variables
Consider the random variables X and Y
x
1
2
3
P(X = x)
1/3
1/3
1/3
y
P(Y = y)
E(X) = 2
E(Y) = 3
VAR(X) = 2/3
2
1/3
3
1/3
4
1/3
VAR(Y) = 2/3
Let Z = X + Y, then the distribution of Z is:
y
x
2
4
5
6
1
3
4
5
2
3
4
and the probability distribution for Z is:
z
3
4
P(Z = z)
1/9
2/9
5
3/9
3
5
6
7
6
2/9
7
1/9
E(Z) = 5
VAR(Z) = 4/3
i.e. E(Z) = E(X) + E(Y)
VAR(Z) = VAR(X) + VAR(Y)
RESULTS:
1.
E(aX + bY) = aE(X) + bE(Y)
2.
VAR(aX  bY) = a VAR(X) + b VAR(Y)
2
2
Note: You still add the variances when the variables are subtracted. Square
root the variance to get the standard deviation
You generally only square a/b terms when dealing with non-context
questions or contextual questions dealing with money
e.g. The “second-hand” bookstore purchases magazines and books. It
pays $5 for books and $2 for magazines.
The mean number of books purchased each day is 50 with a
standard deviation of 9 books
The mean number of magazines purchased each day is 40 with a
standard deviation of 4 books.
Calculate the mean and standard deviation of the amount they pay
each day. Let P = amount paid each day, B = books and M =
magazines.
P = 5B + 2M
PROOF: see workbook
E(P) = 5×50 + 2×40
= $330
VAR(P) = VAR(5B + 2M)
= 52×VAR(B) +22×VAR(M)
= 2089
SD(P) = $45.71
Permutations and Combinations
The Multiplicative Principle
- to find the number of possible arrangements that satisfy certain
conditions, we multiply.
e.g. How many ways are there of selecting a ball rep and a deputy from a
form class of 25?
25 × 24 = 600
How many ways can the first three places in a class of 23 be
selected?
23 × 22 × 21 = 10626
Note: the product of consecutive terms is called a factorial and is written n!
e.g. Calculate 5! =120
Simplify a) 5! = (3×4×5)/3
3!
= 20
b) 6! – 5! = 5!(6 – 1)
= 5 × 5!
= 600
Arranging Items in a Circle
- assume that the first item is fixed, then the others can be considered to be
in a line.
e.g. How many different ways can a discussion group of 6 people be
seated in a circular fashion?
(n – 1)! = (6 – 1)!
= 5!
= 120
Permutations
- are an arrangement of objects in a particular order.
e.g. In how many ways can 4 boys be arranged in groups of 2 if the order
matters?
AB, AC, AD, BA, BC, BD, CA,CB, CD, DA, DB, DC = 12 ways
n
Pr is the number of ways of selecting r objects from n objects in a
particular order.
n
Pr =
n!
(n – r)!
e.g. How many different arrangements can be made by taking 3 letters of
the word Sunday?
6
P3 = 6!
= 120
(6 – 3)!
How many ways can the first three places be awarded in a class of
8?
8
P3 = 8!
= 336
(8 – 3)!
Note: Remember that ORDER MATTERS!
Combinations
- involve the number of selections of n items when order is NOT important.
e.g. In how many ways can 4 boys be arranged in groups of 2 if the order
doesn’t matter?
AB, AC, AD, BC, BD, CD = 6 ways
n
Cr is the number of ways of selecting r objects from n objects in any
order
n
Cr =
n!
r!(n – r)!
e.g. How many ways can 3 books be selected from 8 different books?
8
C3 =
8!
= 56
3!(8 – 3)!
From 4 girls and 3 boys, find the number of committees of 3 that can
be formed with 2 girls and 1 boy.
4
C2 × 3C1 =
4!
×
3! = 18
2!(4 – 2)! 1!(3 – 1)!
A class consists of 15 girls, of 5 whom are prefects. How many
committees of 8 can be formed if each contains:
a) 2 prefects 5C2 × 10C6 =
5!
×
10!
= 2100
2!(5 – 2)! 6!(10 – 6)!
b) at least 2 prefects?
5
C2 × 10C6 + 5C3 × 10C5 + 5C4 × 10C4 + 5C5 × 10C3 = 5790
Permutation Proof:
n
Pr = n  (n – 1)  (n – 2)  . . .  (n – r + 1)
= n(n – 1)(n – 2)  . . .  (n – r + 1) (n – r)!
(n – r)!
n!
=
(n – r)!
Combination Proof:
No. ways in order
No. of different groups =
No. ways r can be ordered
n
Pr
r!
n!
= (n – r)!
r!
n!
=
(n – r)!r!
n
= Cr
=
Pascal’s Triangle
All combinations appear somewhere in this triangle
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
e.g. the row 1 3 3 1 happens to be
3
C0
3
C1
3
C2
3
C3
Binomial Coefficients
In algebra, the formula
n
Cr is called a binomial coefficient.
Three results to note:
 n C0 = 1 choosing no objects from n (one way to do it)
n!
= n! = 1
0!(n – 0)! 0!n!

n
Cn = 1 choosing all objects (one way to do it)
n!
= n! = 1
n!(n – n)! n!0!

n
n
Cr =
Cr =
n
Cn – r two ways of the same selection
n!
r!(n – r)!
n
C n–r =
n!
(n – r)!(n – (n – r))!
=
n!
(n – r)!r!
=
n!
r!(n – r)!
e.g. Simplify
5
C3 +
5
C2
5! + 5! = 3  5! + 3  5!
3!3!
3!2! 2!3!
= 6  5!
3!3!
6
= C3
n
In general
Proof:
Cr +
n
Cr – 1 =
n+1
Cr
n!
n!
n!
n!
+
=
+
r!(n – r)! (r – 1)!(n – (r – 1))! r!(n – r)! (r – 1)!(n – r + 1)!
= (n – r + 1)n! + rn!
r!(n – r + 1)!
=
(n + 1)n!
r!(n – r + 1)!
=
(n + 1)!
r!(n – r + 1)!
=
n+1
Cr
Binomial Theorem
- allows us to expand brackets without repeated multiplication.
n
n
(x + y) =

n
Crx
n–r
y
r
r=0
e.g. Use the binomial theorem to expand (3x + 2)4
4
C0(3x)4(2)0 + 4C1(3x)3(2)1 + 4C2(3x)2(2)2 + 4C3(3x)1(2)3 + 4C4(3x)0(2)4
= 1×81x4×1 + 4×27x3×2 + 6×9x2×4 + 4×3x×8 + 1×1×16
= 81x4 + 216x3 + 216x2 + 9x + 16
Note: The constant term in this expansion is: 16