Ex. Suppose we have a random number generator. Each time it generates an integer between 1 and N (inclusive) with equal probability, that is P({i})=N1 for all integers i between 1 and N.
Suppose N=100.
-
What is the probability that it generates an even number?
A={even}={2,4,6...100}P(A)=10050=21
-
What is the probability that it generates a multiple of 3?
B={multiple of 3}={3,6,9,...99}P(B)=10033
-
What is the probability that it generates a number that’s even AND a multiple of 3?
A∩B={multiple of 6}={6,12,18...96}P(A∩B)=10016
-
What is the probability that it generates a number that’s even OR a multiple of 3? (Note that we mean inclusive OR here)
A∪B={2,3,4,6...99,100}P(A∪B)=P(A)+P(B)−P(A∩B)=10050+10033−10016=10067.
-
What is the probability that it generates a number that’s even, a multiple of 3, OR a multiple of 5?
C={multiple of 5}P(A∪B∪C)=P(A)+P(B)+P(C)−P(A∩B)−P(A∩C)−P(B∩C)+P(A∩B∩C)=10050+10033+10020−10016−10010−1006+1003=10064.
Consider a sample space S that contains finitely many outcomes.
Then for an event A={x1,x2...xn} in S,
P(A)=i=1∑nP(Ei)
where Ei={xi} is a simple event.
Ex. Consider a train with five cars, labeled 1 through 5.
A passenger is twice as likely to enter 3 as they are to enter 2 or 4, and is also twice as likely to enter 2 or 4 as they are to enter 1 or 5. What is the probability for each car that a passenger will enter?
P({i})=pip3=2p2=2p4p2=p4=2p1=2p5p1=p5=x→p2=p4=2x, p3=4x1=P(S)=p1+p2+p3+p4+p5=x+2x+4x+2x+x→1=10x→x=101
Now we can calculate the probability of a passenger entering each individual car using the value of x.
If we assume the probability of each outcome to be the same, i.e. there is a p such that P(Ei)=p for all simple events Ei, then p=N1 and P(A)=np=Nn, where n is the number of elements in A and N is the number of elements in S.
Definition. An ordered sequence of k elements is called a k-tuple. (2-tuples are also called pairs, and 3-tuples may be called triplets.) They’re usually written with parentheses around the elements, i.e. (Heads,Tails,Tails).
Whenever k distinguishable outcomes occur in an experiment, we can represent the elements in the sample space of that experiment as k-tuples.
For example, if we flipped a coin twice, we could represent each possible event from this experiment as a pair, where the first element is the result of the first flip and the second element is the result of the second flip. However, if we flipped two coins simultaneously, the two flips are indistinguishable, so we can’t use tuples to represent the events.
Consider a sample space S whose elements are k-tuples. Let ni be the number of ways of selecting the ith element of each tuple, where 1≤i≤k. Then
N(S)=n1n2...nk=i=1∏kni, where N(S) denotes the number of elements in S.
We can use this rule to quickly calculate the number of elements in a sample space containing tuples.