Tuesday, March 17, 2015

Unizor - Probability Definition - Problems 3





Problem A

Consider two events, X and Y (not necessarily mutually exclusive).
Prove that
P(X∪Y) ≤ P(X) + P(Y).

Problem B

Let A be an event and A be its negation (that is, NOT A).
Prove that
P(A) + P(A) = 1.

Problem C

Consider two events, X and Y.
It is given that
P(X∪Y) = P(X∩Y)
Prove that events X and Y are essentially identical, that is they contain exactly the same elementary events with positive probabilities, while, if there are elementary events with zero probability, they might constitute the difference between X and Y.

Problem D

The random experiment consists of flipping a coin two times in a row.
(a) represent all elementary events in this experiment as strings of letters H (for "heads") and T (for "tails"). What are their probabilities?
(b) using the symbolics from the previous problem (a), express the events E1 - "No tails resulted", E2 - "Only one head resulted", E3 - "Number of heads not equal to number of tails" and E4 - "Number of heads equal to number of tails". What are the probabilities of these events?
(c) Which elementary events constitute the events E1 OR E2 and E3 OR E4. What are the probabilities of these events?
(d) Which elementary events constitute the events E2 AND E4 and E1 AND E3. What are the probabilities of these events?
(e) Which elementary events constitute the events NOT E2 and NOT E4. What are the probabilities of these events?

Monday, March 16, 2015

Unizor - Probability - Event Arithmetic





Let's discuss how logical operations on events are related to their probabilities. This part of the theory is heavily dependent on the representation of events as subsets of elements (each element is an elementary event) and probabilities as an additive measure defined on these subset.

Starting from the simplest case, consider a finite set of elementary events (say, outcomes of rolling a pair of dice) of equal probabilities (in case of a pair of dice each elementary event has probability 1/36).
Since this probability is an additive measure, any combination of elementary events into one bigger event has a probability equal to a sum of probabilities of all elementary events that compose this bigger event (for example, the probability of rolling a pair of dice with a sum equal to 5 is a sum of probabilities of the composing elementary events - rolling 1/4, 2/3, 3/2 and 4/1 on two dice, each having the probability 1/36 and, therefore, the combined probability of having a sum of 5 on two dice equals to 4·1/36=1/9).

Consider now a logical operation OR between two events X and Y (this operation is usually signified in the set theory by a union sign ∪):
Z = X OR Y = X ∪ Y.

First, consider these two events to be mutually exclusive, that is having no common elementary events. Since they are mutually exclusive, elementary events constituting event X are completely different from those that constitute event Y. As we know, event Z consists of elementary events that form a union of elementary events included into event X and those included into event Y. Therefore, the probability measure of event Z is a sum of probabilities of events X and Y. We can, therefore, state that the probability of an event that is the result of an operation OR between two mutually exclusive events equals to a sum of their probabilities.

Now let's establish a connection between intersection of certain type of events and an operation of multiplication.

Consider now a logical operation AND between two events X and Y (this operation is usually signified in the set theory by an intersection sign ∩):
Z = X AND Y = X ∩ Y.
This is an operation of taking only common elementary events between X and Y to form a resulting event Z.

Let's start with an example of rolling two dice (we will call them #1 and #2). Consider an event X{#1 is equal or greater than 5} and an event Y{#2 is equal or less than 4}. From the common sense perspective these events are independent because they apply to two different dice with no connection between them. Let's examine the probabilities of X, Y and X∩Y.
Elementary events in our experiment are still all the possible pairs of numbers from 1 to 6 each - 36 different combinations with equal probability of 1/36 each.
Event X consists of elementary events 5/1, 5/2, 5/3, 5/4, 5/5, 5/6, 6/1, 6/2, 6/3, 6/4, 6/5, 6/6. Therefore, it's probability is 12/36=1/3.
Event Y consists of elementary events 1/4, 2/4, 3/4, 4/4, 5/4, 6/4, 1/3, 2/3, 3/3, 4/3, 5/3, 6/3, 1/2, 2/2, 3/2, 4/2, 5/2, 6/2, 1/1, 2/1, 3/1, 4/1, 5/1, 6/1. Therefore, it's probability is 24/36=2/3.
Event X∩Y consists of only one elementary events 5/4, 6/4, 5/3, 6/3, 5/2, 6/2, 5/1, 6/1. Therefore, it's probability is 8/36=2/9.
Notice that
P(X∩Y) = P(X)·P(Y)
and this is not an accident. The important consideration here is the independence of X and Y, which we did not define precisely, but just mentioned it in a casual common sense. It was indeed natural to consider the results of rolling two different dice as independent events.

As you see, logical operation AND between independent events results in the multiplication of probabilities.
This fact is a basis for using multiplication sign · instead of logical AND between independent events. The above equality looks now as
P(X · Y) = P(X) · P(Y).

To summarize, this lecture was about two logical operations on events, OR (∪) and AND (∩).
We have shown that the OR of mutually exclusive events is similar to addition, so we are justified replacing sign ∪ between two events with sign of addition +:
P(X+Y)=P(X)+P(Y)
and the AND of independent events is similar to multiplication, so we are justified replacing sign ∩ between two events with sign of multiplication ·:
P(X·Y)=P(X)·P(Y)

Finally, using the operation of intersection, we can express the probability of a union between any two (not necessarily mutually exclusive) events as
P(X∪Y)=P(X)+P(Y)−P(X∩Y).
Indeed, summing together probability measures of events X and Y, we counted twice the probability measures of all elementary events common for them. That's why we subtracted the probability measure of their intersection.

Wednesday, March 11, 2015

Unizor - Probability - Advanced Problems 3





Problem A
M passengers enter a bus at a bus stop in the beginning of its route. There are S stops on the bus route (not counting the beginning stop) where these passengers can exit.
Let's assume that the probability of any passenger to exit on any stop is the same, that is, they exit completely randomly.
Assuming that the number of passengers M is less than the number of bus stops S and no new passengers are entering a bus, what is the probability of
(a) all of them exit at different stops?
(b) all of them exit at the same stop?
(c) one passenger exits at each sequential stop until all of them are exited, so that Mth passenger exits at the Mth stop?

Answer:
(a) C(S,M)/S^M;
(b) 1/S^(M−1);
(c) M!/S^M.

Problem B
Six cards are randomly pulled from a standard deck of 52 cards.
What is the probability of having all four suits represented among these six cards?

Answer:
P = {C(4,1)·C(13,3)·[C(13,1)]^3 + C(4,2)·[C(13,2)]^2·[C(13,1)]^2} / C(52,6)

Monday, March 9, 2015

Unizor - Probability - Advanced Problems 2





Problem A

A poker dealer gave you five cards from the standard deck of 52 cards.
What is the probability of getting "Four of a Kind" combination?
The combination "Four of a Kind" is the one when you have four cards of the same rank (say, four 9's or four King's) among five cards in your hand with the fifth card being of a different rank.

Answer: 13·48/ C[52,5]

Problem B

A poker dealer gave you five cards from the standard deck of 52 cards.
What is the probability of getting "Full House" combination?
The combination "Full House" is the one when you have three cards of one rank (say, three 8's or three Jack's) and two cards of another rank (say, two queens or two 5's) among five cards in your hand.

Answer: 13·C[4,3]·12·C[4,2] / C[52,5]

Problem C

A poker dealer gave you five cards from the standard deck of 52 cards.
What is the probability of getting "Straight" combination?
A "Straight" is a combination of five cards with sequential ranks of not of the same suit. For example, Queen, Jack, 10, 9, 8 of not of the same suit. If they are of the same suit, the combination is called "Straight Flush" and is considered to be a different combination.
There is one more rule for a "Straight". The Ace of any suit can be the highest ranking card in a deck for a "Straight" combination Ace, King, Queen, Jack, 10 or the lowest ranking card in a deck with the rank of 1 in a combination 5, 4, 3, 2, A
.
Answer: (10·4^5 − 10·4) / C[52,5]

Problem D

A poker dealer gave you five cards from the standard deck of 52 cards.
How many different "Three of a Kind" combinations you can get?
The combination "Three of a Kind" is the one when you have three cards of the same rank (say, three 9's or three Kings) among five cards in your hand, and the other two cards of not of this rank (otherwise, you would have "Four of a Kind" combination) and not of the same rank among themselves (otherwise, you would have "Full House" combination).

Answer: (13·C[4,3]·C[12,2]·4^2) / C[52,5]

Unizor - Probability - Easy Problems 6





Problem A
Assume you have a box filled with N balls of equal sizes and weights, but of n different colors: there are A1 balls of the first color, A2 balls of the second color,..., An balls of the nth color in the box.
So, Σi=1...n (Ai)=N).
You randomly pick M balls from the box.
What is the probability that you pick exactly Bi balls of the ith color (where i=1,2,...,n and Σi=1...n (Bi)=M)?
Amswer:
C[A1,B2]·C[A2,B2]·...·C[An,Bn] / C[N,M].

Problem B
Imagine the following simple game - actually, a kind of a primitive pinball without controls. A player puts a small ball into a spring launcher on a board with many pins and, as the spring released, the ball randomly moves on the board hitting the pins and eventually ends up in one of the holes at the base of a board with certain number of points associated with it.
There is no restriction in the number of balls going through the same hole, they just fall through into some receptacle. Assume that the probability of a ball to fall through any hole is the same for all holes.
There are M different holes on the board and a player plays N times.
Determine the distribution of probabilities of N balls randomly falling through M holes.
Answer: N!/[(M^N)·K1!·K2!·...·KM!)]

Wednesday, March 4, 2015

Unizor - Probability - Easy Problems 5





Problem A

In the box there are R red balls and B black ones. If we randomly pick N balls from the box, what is the probability to have S red balls among them?

Solution

Our sample space contains all the combinations of N balls out of R+B, that is there are C[R+B,N] combinations of equal probability of occurrence.
Out of these elementary events we need only those combinations that contain exactly S red balls with the rest N−S balls being black. Since there are R red balls, we have C[R,S] choices for a group of S red balls. With each of them, similarly, we have C[B,N−S] choices for a group of N−S black balls. Therefore, the number of choices for a group of N balls that contains S red and N−S black balls equals to C[R,S]·C[B,N−S].
Hence, the probability to pick such a group is
C[R,S]·C[B,N−S] / C[R+B,N].

Problem B

Standard deck of cards contains 52 cards of four different suits. Let's call cards ranking from 2 to 10 Numerics and others (Jacks, Queens, Kings and Aces) we will call Pictures.
So, we have 36 Numerics and 16 Pictures in the deck.
We randomly pull 2 cards out of deck.
Calculate the probabilities of having
(a) both Numerics;
(b) both Pictures;
(c) one Numeric and one Picture.

Solution

Our sample space contains C[52,2] pairs of cards. All are equally probable.
(a) The number of pairs with both Numeric cards equals to C[36,2]. Therefore, the probability of pulling a pair of Numerics is C[36,2] / C[52,2] ≅ 0.4751.
(b) The number of pairs with both Picture cards equals to C[16,2]. Therefore, the probability of pulling a pair of Numerics is
C[16,2] / C[52,2] ≅ 0.0905.
(c) The number of pairs with one Numeric and one Picture cards equals to C[36,1]·C[16,1]. Therefore, the probability of pulling a pair of Numerics is C[36,1]·C[16,1] / C[52,2] ≅ 0.4344.
NOTE: It's always a good practice to check that sum of probabilities of all mutually exclusive events equals to 1.
In our case all three events are mutually exclusive and encompass all possible results of the experiments. Their probabilities share the same denominator C[52,2]. Let's check that the sum of all three numerators equals to this denominator.
C[52,2] = 52·51/(1·2) = 1326
C[36,2] = 36·35/(1·2) = 630
C[16,2] = 16·15/(1·2) = 120
C[36,1]·C[16,1] = 36·16 = 576
630+120+576 = 1326
Check.

Problem C
The revolver can hold 7 bullets, but there is only one bullet in it. A person playing "Russian roulette" spins the cylinder and pulls the trigger. Then he does the same once more.
What is the probability of not firing these two times in a row?

Solution
The probability of firing is 1/7. The probability of not firing is, therefore, 6/7.
Two events, not firing the first time and not firing the second time, are independent, and the probability of each is 6/7. The probability of a combination of these two independent events equals to a product of their probabilities, that is
(6/7)·(6/7)=36/49.

Problem D

Knights of the Round Table, including Sir Lancelot and King Arthur himself, randomly choose their chairs at the round table in the King Arthur's castle.
Assuming there are N knights, what is the probability of Lancelot and King Arthur to sit next to each other?

Solution 1
Let King Arthur choose whatever chair he wants. Then there are N−1 chairs left for Sir Lancelot. Only 2 of them are next to King Arthur. Therefore, the probability to sit next to him is 2/(N−1).

Solution 2
The total number of positions N knights can take around the table is N!. The number of positions Sir Lancelot and King Arthur can take to be next to each other is 2·N (any chair out of N for one and two positions of another on both sides of the first). With each of them there are (N−2)! positions of other N−2 knights. Therefore, the number of positions all knights can take with Sir Lancelot and King Arthur sitting next to each other equals to
2·N·(N−2)! / N! = 2/(N−1)

Tuesday, March 3, 2015

Unizor - Probability - Easy Problems 4





Problem A
Three students were preparing for an exam that contained 100 questions.
The first student was lazy and prepared for only 50 questions out of 100.
The second student was reading an interesting novel he had to finish before preparing for an exam, he managed to prepare for 75 questions.
The third student tried hard, was about to finish all the questions, but at the last day preceding an exam he met a girl and could not finish his preparations, so he was ready for 90 questions.
At exam each student has randomly chosen one question.
Calculate the probabilities of the following events:
(a) all students got questions they have prepared for;
(b) all students got questions they have not prepared for;
(c) exactly one student got a question he was not prepared for;
(d) at least one student got a question he was not prepared for.

Problem B
Consider a standard deck of card. It contains cards of four suits (Spades, Hearts, Diamonds and Clubs), each suit has cards with numbers from 2 to 10 (let's call this group of cards Numerics) and cards with pictures - Jack, Queen, King and Ace - that we will call Pictures.
So, we have 36 Numerics and 16 Pictures in the deck.
(a) We randomly pulled one card from the standard deck and it happened to be Numeric.
What is the probability that the second card randomly pulled after that is Numeric?
(b) We randomly pulled one card from the standard deck and put it aside without looking.
Then we randomly pulled the second card and it happened to be Numeric.
What is the probability of the first card to be Numeric?
(c) We randomly pulled all cards except one without looking.
What is the probability of the last one to be Numeric?

Problem C
Using the same standard deck of cards determine the probability of randomly picking 13 cards out of 52 such that among them are all four Aces, all four Kings, all four Queens and any one Jack (the strongest possible hand in the game of bridge if contract specifies no trump suit).