My notes for this page:

Quite complex: Randomness under conditions.

23 Quite complex:  Randomness under conditions.

Slide 0

A wonderful day to you all. Welcome to this new episode about randomness and about conditions for certain events. This time it will be quite complex – I’ve said this much already.

Slide 1

Here is the fundamental question: Are probabilities really always fixed quantities? Or do they sometimes depend on the respective circumstances? Let’s first look at an example to explain what this is about.

We’ll look at math and music, or rather the inclination for music while taking a love of math into account. Perhaps you’ve heard before that mathematicians very often play an instrument like virtuosos. Thus here is the question:

Is it true that a person who is good at math is more likely to play a musical instrument than a person without an affinity to this subject?

Slide 2

Once again, we cannot avoid a poll. However, I admit that this time I made up the numbers to make the calculations easier.

So, let’s assume that 1,000 students in grade 12 have participated in a poll on the topic. The grades on report cards were used for the criterion “good at math,” and the grade should be at least a “B.” The criterion “plays an instrument” is met if the student plays music at least twice a week. Naturally, we could argue about these definitions because they very clearly influence the assessment of the statement. However, this is not the point right now.

Instead, let’s look at the table and the numbers. The four possibilities appear in the four cells: Either a person plays an instrument and is good at math, or else only one of the criteria is met, or the person really isn’t excited about math or an instrument.

You see the numbers in the corresponding cells, which must add up to 1,000: 90 play music and are good at math, 590 don’t like either, and 110 and 210 meet exactly one criterion.

Slide 3

This is the same table, but we have converted the absolute numbers to relative numbers, which you can read as percentages: 9 percent play music and are good at math, 59 percent don’t like either music or math, and 11 percent and 21 percent meet exactly one of the criteria.

In terms of the criteria, 200 students – and that’s 20 percent – are good at math and 300 – or 30 percent – regularly play an instrument.

Slide 4

Of course, you can also use a tree diagram for the representation. Two hundred or 20 percent or 2/10 are good at math, and consequently 8/10 are not. We enter this in the first step.

Slide 5

Now we will look at the next step in the same way with reference to the first step. Of the 2/10 students who are good at math, 90 of 200 play an instrument and 110 of 200 do not. This corresponds to 9 of 20 and 11 of 20. Here you see these numbers entered as fractions.

Similarly, with reference to the students who do not have particularly good grades in math, 210 of 800 or 21 of 80 play an instrument and 590 of 800 or 59 of 80 do not.

Slide 6

Now, Anna was randomly selected in this grade. The probability that she plays music at least twice a week is 3/10.

Does anything change with this probability if we also know that she is good at math?

Slide 7

Probably. After all, Anna belongs to a subsample of 200 persons of whom 90 (and thus just under half) regularly play an instrument.

Slide 8

So let’s calculate. Ultimately, again it’s all about dividing the number of favorable cases by the number of possible cases.

Favorable means that BOTH conditions are met.

Possible means that at least the math grade is correct.

The probability that Anna plays an instrument if she is good at math is thus 90/200 or 45/100 or 45 percent.

Slide 9

We can write this as a formula, whether or not you love formulas.

We set A  = “is good at math”

And we set B  = “plays an instrument”

Then we determine the probability

P (Anna plays an instrument if she is good at math)

via the probabilities of favorable and possible cases.

The formula is generally written as P(B|A) – sometimes also PA(B) – and is read as P of event B given event A.

P(B|A) = P(A n B) : P(A)

Slide 10

Let’s look at another example.

We roll a die twice and would like to know how high the probability is that the sum of spots will be at least “9” when the first roll is a “5.”

Here are the variables:

A := you roll a “5”;   B := you roll at least a sum of “9”.

Once again, here is the formula:

P(B|A) = P(A n B) : P(A)

P(A) = 1/6 and P(A n B) = 3/36 (you can compare slide 8 or consider that 5+1, 5+2, and 5+3 are all less than 9).

Thus, P(B|A) = 3/36 : 1/6 =  1/2.

OK, admittedly, we probably could have managed this without a formula ;-).

Slide 11

And once again, it almost never hurts to show examples.

A study on a vaccine’s effectiveness involved 1,000 people. They were vaccinated, criterion A, or not vaccinated and got sick (of course, only after the vaccination), criterion B, or not. Here you see the absolute numbers. Then it is apparent that

P(A) =  400/1,000 = 2/5 = 0.4

P(B) =  200/1,000 = 1/5 = 0.2

P(A n B) = 50/1,000 = 1/20 = 0.05

And thus P(B|A) = 1/20 : 2/5 = 1/8 = 0.125

Slide 12

We define the following:

If A and B are events of a random experiment, then

is the conditional probability of event A if event B occurs.

Slide 13

We end up with the formula called Bayes’ theorem.

If A and B are events of a random experiment with P(A) > 0 and P(B) > 0, then

and .

 

Slide 14

We’ll take the formula as an opportunity for a last, well-known example.

Do you still remember the fish sticks?

We had feared that they weren’t arriving totally pure in stores and 1 percent were contaminated with seahorse meat. There was a test to check for contamination, and the test detected the right result in 90 percent of the cases.

Hopefully you remember this slide from episode 17.

In the mentioned episode, we had calculated all probabilities by hand. Now let’s try it using the formula.

Slide 15

How high is the probability that a fish stick will really test positive under the condition that it is contaminated? Very simply, this is known via the test. It is

P(contaminated | test positive) = 0.9.

Slide 16

Now, how high is the probability that a fish stick is really contaminated under the condition that it tested positive? We can calculate this and with the formula arrive at

Of course, this is identical to our “handmade” result.

Slide 17

By the way, in an expanded form, Bayes’ theorem establishes a connection between the events of a random experiment and the complementary events. And this connection should at least be mentioned.

If A and B are events of a random experiment, then

         

and logically we assume that all probabilities occurring in the denominator > 0.

Slide 18

Let’s summarize what we have worked on today:

  • We have looked at multistage random experiments again.
  • We have worked with conditional probabilities and wanted to know whether the probability of an event can change if we have additional information.
  • We have learned about Bayes’ theorem for determining these conditional probabilities.

But don’t forget. Ultimately, it is always essential to determine the number of favorable cases and the number of possible cases because each probability can be traced back to these numbers.

Slide 19

That’s all for today. Thank you for being here, and we’ll see each other again in the next episode. Then we will again use the knowledge we have worked out today, not entirely without effort. Until next time.

Tip: Log in and save your completion progress

When you log in, your completion progress is automatically saved and later you can continue the training where you stopped. You also have access to the note function.

More information on the advantages