## Basic Probability, part 6

### August 24, 2009

The another type of presentation the probability is a table with occasions and their frequencies. For example, we have been watching basketball game and the team is stable with 5 players, and we calculated that players scores in a row are following:

If we are watching a random scene of the games and our team scored. The probability that this score has done by player 3 is

**Expectation.**

Consider an example, there is a one-armed bandit machine in a casino and it works on following idea: on every 400 attempts to win machine gives to win 2 times with $25 and 1 time with $45. If each attempt costs $1, what we can expect as average winning in long run?

To answer on this question we need to know the notion “expectation”. **Expectation or expected value **is a long run average and is calculated as:

where is the first occasion in numbers and is the probability for the first occasion, and so on for the rest occasions.

Now let us look at our example in a casino. Denote the first occasion as lose, so doll. and , the second occasion is win $25, so doll. and , the third occasion is win $45, so doll. and . Put all information together in the table:

Calculate expected value or expectation:

Round the value to

And what does it mean? It means that if we are going to play with the machine for a long time every arm dropped will cost to us $ It is the average value that we loose.

Pretend the following case.

We has sat all the night in a casino and played in one-armed bandit. We dropped the arm 400 times, on 25th and 142nd attempt we won $25, on 177th drop we won $45, the rest attempts were lose.

You can see that sometimes we lose, sometimes we won, however it looks like we came to the machine and gave $ for every attempt without losing $1 or winning $25 and $45.

Now let us see the view from the casino owners. When one is going to play in our casino in one-armed bandit and saying “I am going to win”, he(she) is wrong. We are going to win! And at an average on every drop we win $ or approximately 66 cents.

## Basic Probability, part 5

### August 24, 2009

Let us revise some information.

Pretend we at random choose two cards from a deck at the same time and we want to know what is the probability that we choose a queen or a king. As we know we these two events are mutually exclusive, because one card cannot be and a king and a queen at the same time, so we need to add two probabilities:

**Independent events.**

And now consider the case when we toss a coin an the choose at random on card from a deck. What is the probability that we get Heads and an ace? As we know we need multiple probabilities of those two events: Current two events are called **independent**, because the second event “choose an ace” is not depend on the first event “get Heads”. The probability of getting an ace is and it is independent weather we toss coin or not. The same for coin.

**The multiplication rule 1:**

If event A and event B are independent, then

**Dependent events.**

Let us get a queen from an ordinary deck with 52 cards. The probability of this event is Now put the queen in a pocket. And try to get another queen from the deck. Notice that we have 51 cards and 3 queens! So the second event to get a queen has probability

These two events are called dependent events, the second event is dependent from the first. The probability that event B occurs given that event A has already occurred is denoted as

In our case with two queens the probability that we get a queen in the first choose and it is not replaced, and we get a queen in the second choose is:

**The multiplication rule 2:**

If event A and event B are dependent, then

## Basic Probability, part 4

### August 23, 2009

All previous examples were with mutually exclusive events. These are events that do not have common cases or cannot occur at the same time. For example, the event “select a king” and the event “select an ace” from the deck are mutually exclusive, because we cannot select them both if we take one card.

**The additional rule 1:**

If two events (A and B) are mutually exclusive, then

Thus the probability for the event “select a king or a queen” from a deck is

The example of not mutual exclusive events is “select an ace” and “select the spades” in a deck, because there are 4 aces, 13 spades cards, and there is one common case – the spades ace! The spades ace belongs to the group “aces” and to the group “spades” at the same time.

**The additional rule 2:**

If two events (A and B) are not mutually exclusive, then

In our case the probability of the event “select an ace or an spades card” is

Why do we need to subtract the probability of common cases

Consider this issue in the next example. Look at the picture:

Let us find the probability of the event “randomly select a triangle or a yellow figure”. There are 12 figures at all and as we can see for our ask there are follow 7 figures:

So, the probability of the event “randomly select a triangle or a yellow figure” is

Good, but what do occur when we add the probability of the event “select a triangle” to the probability of the event “select a yellow figure”? There are 5 triangles and 5 yellow figures, so after add them up we get 10 figures, while we need 7 figures. The three excess figures occurs, because they are common and we have three yellow triangles, that belong to the group “triangles” and to the group “yellow figures” at the same time. Notice that after adding we count common figures two times: first, when we count triangles and second, when we count yellow figures:

Thus we need to subtract the number of common figures.

The probability of the event “randomly select a triangle or a yellow figure” is:

## Basic Probability, part 3

### August 23, 2009

Dice are very old instruments for games, thus they had been found in Egyptian tombs, dated to 2000 BC. Dice gamble were greatly popular in ancient Greek, Rome, Asia, then in medieval Europe and it has been being popular today. In ancient times the throw of dice was believed to be controlled by the gods. Famous was the game with throwing two dice and guessing the sum of the numbers. People noticed that the number 7 as the sum turns out more frequently and they thought that the cause is the gods favour. Number 7 is the lucky number!

Today with maths help we can understand why the sum 7 appears more frequently.

Consider all possible cases in rolling two dice. The first die has 6 sides and 6 numbers, the same is for the second die – 6 sides with 6 numbers. All possible sums of these numbers are from 1+1=2 to 6+6=12.

The picture below presents the table with all possible cases, each intersection presents the sum of the numbers of two dice:

As you can see the sum 7 appears more frequently than any other sum. There are 6 cases with the sum 7 and there are 36 possible cases at all. Hence the probability that the sum of two rolled dice will be 7 is

The probability for the sum 7 is the greatest. For example, for the sum 5 the probability is since there are only four cases we can get the sum 5.

Moreover, the probability of getting the sum 7 is equal to the probability of getting the sum (2 or 3 or 11 or 12), since

Ancient people used the number 7 of the sum two dice to check cheating. If the sum 7 appeared often then dice are fair, if not then dice are loaded. Brilliant method!

## Basic Probability, part 2

### August 23, 2009

Another way to consider the probability is graphical way.

Consider the following case:

there are a coin and the five balls in a bag with numbers 1,2,3,4,5 respectively. We toss a coin and then take out from the bag a ball.

Let us draw first event – tossing the coin, there can be H with the probability and T with the probability :

Pretend that we get H, then we take a ball with the probability for each number. Notice that the occasion there will be the same if we get T, and then take a ball with the probability :

As we know to calculate the probability of two events we need to multiply them. Thus the probability of the event “T on the coin and the ball number 1” is .

The probability of the event “T on the coin and the ball number 2” is .

The probability of the event “H on the coin and the ball number 3” is , and so on.

And as we know the probability of all cases is equal 1:

the probability of getting H or T on the coin is ;

the probability of taking the ball with the number 1 or 2 or 3 or 4 or 5 5 is ;

the probability of getting H or T on the coin and then taking the ball with the number 1 or 2 or 3 or 4 or 5 is . You can see it on the previous picture.

**Score a goal**.

Get an another example. We are watching football game and we know that the forward scored 300 goals in 1000 attacks. So the property that he score a goal in an attack is If there were 2 attacks, what is the probability that the forward scored the goal on the first attack and missed on the second attack. To get answer we need to calculate the probability of the missing in an attack, it is since the forward could miss or score and nothing else. Denote “Score a goal” as S, “Miss a goal” as M, and show all possible variants on the picture:

As before we multiplied the probabilities. The probability that the forward scored the goal on the first attack and missed on the second attack is

For 3 or more events, for instance, when 3 attacks occurred we need to draw a picture with a larger tree (scheme). The idea is the same.

**Score a goal in the five attempts.**

Consider the case when we play the basketball and have 5 attempts to throw the ball. If we know that we can get a score with the probability what is the probability that we at least take one score in all 5 attempts. What does it mean? It means that we need to find all possible variants of the scoring except one – when we miss every time in all five attempts. In other words, we find and it will be the answer.

To calculate let us find the probability of missing in an attempt, it is

Hence the probability that we lose all attempts is

Then the probability that we at least take one score in all 5 attempts is And it is very high, so probably we take a score.

## Basic Probability, part 1

### August 22, 2009

In this part we are going to discuss classical probability and it’s applications.

What does probability mean?

Consider an example. Let’s toss a die. There are only 6 possible outcomes for us: ultimately a die shows upper side with only one number and there are 6 numbers. All these possible outcomes are called **sample space**. So our sample space is

Now let us consider some events: the die shows 1, the die shows 2, the die shows 1 or 2, the dies shows an even number (2 or 4 or 6), and so on. Choose the event – the die shows 2.

The formula for determining probability for an event E is:

The number of outcomes in the event “the dies shows 2” is 1, because it is only one case when we can get number 2. The number of outcomes in the sample space is the number of all possible cases and, as mentioned upper, is 6.

So, we can write our first probability: the probability of the event that the die shows 2 is

The event “the die shows an odd number” has 3 outcomes: 1 or 3 or 5. Then probability for this event will be

Now let us consider a coin. The sample space is

The probability that tossed coin shows H(Heads) is The same is for T(Tails).

And there is more complicated case: let us toss two coins instantly. We have 4 outcomes: HH, HT, TH, TT.

What is the probability of the event that we get H on the first coin and H on the second, or in other words P(HH).

It is equal , since we have 1 outcome for HH, and at all 4 outcomes.

As you can see the lowest number of outcomes in the event is 0, when it does not occur, and the highest is equal to the all numbers of outcomes (outcomes in the sample space). So the probability will be always from to , or, the same, from 0 to 1. So we can write constrained formula for every probability:

Moreover, the probability of the event concluded all cases is always equal 1. For example, we toss a coin and the probability of the event “H or T” is equal . In the case of the two coins tossed instantly, we have .

The Multiplication.

Now consider two events: we toss a coin and then toss a die. What is the probability for the outcome H on the coin and 5 on the die? To consider this task we need to multiply the probability of the first event by the probability of the second event. The probability of the event “H on the coin” is equal , the probability of the event “5 on the die” is equal So the asked probability is

What with “T” on the coin and “2 or 3” on the die?

**Exclusive probability.**

The probability for all cases is equal 1. If we know that there are a class of the 20 boys and the 10 girls, we choose randomly a person, what is the probability that it is a boy?

There are 30 persons at all and 20 boys, then asked probability is For a girl is As your can see for all possible cases, if we chose a boy or a girl So as we said total probability is always equal 1.

If we know that there are women and men in the city and we go to the street, the probability that we firstly meet a man is What is the probability that we meet a woman firstly? We can use the rule of exclusive: the probability that it is a woman or a man is equal 1, the probability tat it is a man is , and Then

So, the asked probability for a woman is equal

The same, if we know that there are in the parking either blue or green cars and no other colours and there will be a robbery. The probability that a hijacker get a blue car is Then we can immediately say that probability that a green car will be stolen is

Thus, if you see a confuse task like: “there are 254 tickets for a lottery, which were sold for $2.5 each, while Jimmy bought 3 tickets and you bought 15. What is your chance to win (in the form of probability) if there are only five winning tickets”, now you should know the answer. At first, look at the question, then look at the information. We asked about the probability to win and have 5 winning tickets of 254, while we bought 15 of them. We do not care about Jimmy and the cost.

We know all we need: the number of outcomes in the sample space is 254 and the number of outcomes in the event if we bought one lottery is 5 (winning). So the probability for one bought ticket is is equal however we bought 15 of them, so we multiply by 15 and have

If you do not get some stuff, do not be upset because in the next post there will be the graphical explains and it will be easer to understand.