Math1905 l7-8
Math1905 l7-8
Math1905 l7-8
MATH1905 Statistics
Lecture 7
Lecturer: Marc Raimondo Carslaw 817 Lectures: Mon.11am (Chem LT1), Tue.8am (Chem LT1) Student consultations: Tuesday 2-3pm General information, tutes, solutions etc... http://www.maths.usyd.edu.au/u/UG/JM/MATH1905/ or First Year Oce (FYO), Carslaw 520.
MATH1905 Statistics
Lecture 7
= {1, 2, 3, 4, 5, 6}...if this list is FINITE we denote || denotes the number of simple events in . Algebra of events:list of all possible subsets of Let A, B be 2 subsets of . Union:A B = A OR B Intersection: A B = A AND B Mutually exclusive events: AB =
A B = = empty set
B=outcome is odd
MATH1905 Statistics
Lecture 7
MATH1905 Statistics
Lecture 7
Counting
n! = # permutations of n items= # ordered sample of size of n = # ways to sample n items WITHOUT REPLACEMENT: n (n 1) (n 2) ... 2 1 Example:# ways to draw r ballsWITHOUT REPLACEMENT from an urn which contains n balls: n (n 1) (n 2) ... (n r + 1) =
n r
n! (nr )!
(combinations) =
n! (nr )!r !
among n(without repl.)when ORDER does not counti.e. when choosing 3 numbers amoung 1,2,..,5,6:{1, 2, 3} = {2, 1, 3}
MATH1905 Statistics
Lecture 7
We nd the probability that a random sample of size n results in a sample A of the following composition n = n1 (type 1) + n2 (type 2) + ... + nk (type k)
P (A) =
N1 n1
N2 n2
...
N n
Nk nk
MATH1905 Statistics
Lecture 7
Example
Twelve animals are classied by tail length. There are three with
N = 12 = 3 + 4 + 5
(i ) If a sample of two is selected at random,what is the probability that one has a short tail and the other a long tail?
n=2=1+0+1
3 1
P (A) =
4 0 12 2
5 1
= 0.23(2dp)
If six animals are selected at random, what is the probability that tail lengths are equally represented?
n=6=2+2+2
MATH1905 Statistics
Lecture 7
MATH1905 Statistics
Lecture 7
...when two events A, B (sets) do not overlap the weight of A or B is the sum of the (respective) weights
MATH1905 Statistics
Lecture 7
Examples
A fair 12sided die is rolled and the number X on the upper face is noted.Let A be the event that X is a perfect square, B be the event that X is odd and C be the event that X is more than 1.What are the probabilities of the events
3 12
(i ) A = {1, 4, 9, }
P (A) =
= 0.25
6 12 2 12
P (B) =
= 0.5 =
11 12 1 6
P (C) =
=1
1 12
P (A B) =
A box contains 13 items of which exactly 8 are defective. Four of the items are taken at random from the box. What is the probability that more than two of them are defective? ...
MATH1905 Statistics
Lecture 7
Review problems P&Q pp. 7879: 1, 2, 3, 5, 6, 8, 9 (a), 9 (b), 11. R commands Create an (ordered) list of (integer) numbers: x=1:12 Random permutation (sampling without replac.): x.perm=sample(x) Random permutation (sampling without replac,) of size n: x.perm=sample(x,n) Sampling with replac. (bootstrap sampling) of size n: x.boot=sample(x,n,TRUE)
MATH1905 Statistics
Lecture 7
Proof of R2a
A B = (A B c) (A B) (Ac B) using A = (A B c) (A B) P (A) = P (A B c) + P (A B) similarly P (B) = P (B A) + P (B Ac) from which we see that P (A B c) = P (A) P (A B) P (B Ac) = P (B) P (B A) hence P (AB) = P (A)P (AB)+P (AB)+P (B)P (B A) P (A B) = P (A) + P (B) P (A B) m.e. using A3 P (A B) = P (A B c) + P (A B) + P (Ac B)
MATH1905 Statistics
Lecture 8
Lecture 8: Conditional probability Relative frequencies Hair colour: A = fair; eye colour: B = blue.
B Bc total A 100 200 300 Ac 300 400 700 total 400 600 1000
The relative frequency of blue-eyed people in the group is 400 rf(B) = 1000 and the relative frequency of fair-haired, blue-eyed 100 people in the group is rf(A B) = 1000 . The relative frequency of fair-haired amongst the 400 blue-eyed 100 members of the group is rf(A|B) = 400 . we can write rf(A|B) = rf(A B)/rf(B)
MATH1905 Statistics
Lecture 8
IndependenceTo generalise, write nAB istead of 100,nB instead of 400,n instead of 1000, and so on.If we consider the attributes of hair and eye colour to be independent then we would expect that the relative frequency of fair-haired people amongst all blue eyed people rf(A|B) =
nAB should nB
in a large sample be
about the same as the relative frequency of fair-haired people amongst the non-blue-eyed,and both should be about the same as the overall relative frequency of fair-haired people, rf(A) =
nA . n
nA n
nB n
P(A B) = P(A)P(B).
MATH1905 Statistics
Lecture 8
Events may be independent under P but dependent (i.e. not independent) under a dierent probability, P , say.(On the other hand, the mutually exclusivity of events has nothing to do with the choice of probability.)
ExampleOne red and 19 white balls in an urn.Draw 2 balls at random.A = 1st ball red, B = 2nd ball red. Sampling with replacement:
1 20
1 20
1 P(B|A) = 20 1 1 P(A) = 20 20
1 = ( 20 )2 =
MATH1905 Statistics
Lecture 8
2 20
P (A) + P (B) =
P (B) =
1 20
MATH1905 Statistics
Lecture 8
ExampleConsider families with exactly 2 children; suppose events bb, bg, gb, gg are equally likely. Let H denote children of both sexesand A denote at most one girl. Then P(A) = 1 P(gg) = 3/4 and P(A H) = P(H) = 2/4 so A and H are DEPENDENT
Now consider families with 3 children and suppose events bbb, bbg, , ggg are equally likely (1/8 each). Then P(A) = P(no girls) + P(one girl) = 4 , 8 P(H) = 1 P(bbb) P(ggg) = and H are INDEPENDENT
6 8
and P(A H) =
3 8
so A
MATH1905 Statistics
Lecture 8
P(A) =
i=1
P(A|Bi) P(Bi).
MATH1905 Statistics
Lecture 8
+ 0.04
35 100
+ 0.02
40 100
= 0.0345
MATH1905 Statistics
Lecture 8
P(Bi)P(A|Bi)
MATH1905 Statistics
Lecture 8
P (A|D) =
2
colourblind.If a colourblind person is chosen at random from equal numbers of men and women, what is the probability he is male?
P (B|M )P (M ) P (B|M )P (M )+P (B|F )P (F )
P (M |B) =
= 0.95
MATH1905 Statistics
Lecture 8
More examplesDie A has four red and two white faces, whereas
die B has two red and four white faces. A fair coin is ipped once; if it falls heads, the game continues by throwing die A only; if it falls tails, die B is used. (a) Show the probability of a red is 1/2 at any throw. (b) If the rst two throws result in red, what is the probability of red at the third throw? (c) If the rst n throws yield red, what is the probability die A is being used?
Review problems P&Q pp. 7881 7, 9, 14, 23, 24, 25, 26.