Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2009-10-29 06:31:35

Hioj
Member
Registered: 2009-10-25
Posts: 16

A project in probability

Hello everyone. We have a problem in school with a lot of different probability problems, including the following, which I'm not 100% sure about:

Penalties

A match between team A and team B has to be decided on penalties. Every team has to kick 5 times. We assume that be every try there's a 70% chance of making a goal. Team A starts. Find the probability that after 5 tries to each team, team A has won, team B has won or the penalties end equal, when:
a) No team has missed and team B has to kick for the last time.
b) No team has missed and team B has to shoot for the 2nd last time.
c) A has missed the first shot.
d) Find more of interest on your own.



The way I think about it is this:

Definition:
S = Score
F = Fail

a) team A has a 30% chance of winning and thus team B has a 30% chance of losing. There's a 70% chance of the penalties ending equal.

b) There are several ways the match can end:
Team A score is: SSSS-
Team B score is: SSS--

Assuming team A wins:
B: 4. S 5. F
A:        5. S

B: 4. F (5. S or 5. F - doesn't matter)
A:         5. S

So the probability of team A winning would be the probability of each of these, i.e.

and

and


Assuming team B wins:
B: 4. S 5. S
A:        5. F

Probability:


Assuming the match ends equal:
B: 4. S 5. S
A:        5. S

B: 4. S 5. F
A:        5. F

Probabilities:

and


c)
There are LOTS of combinations here:

Assuming team A wins:
1.
A: 1. M 2. S 3. S 4. S 5. S - 4 scores
B: 1. M 2. M 3. S 4. S 5. S - 3 scores 2 misses

Team B is a binomial, team A is not:

2.
A: 1. M 2. M 3. S 4. S 5. S - 3 scores 1 miss
B: 1. M 2. M 3. M 4. S 5. S - 2 scores 3 misses

Both teams are binomials:

...and so forth.


Assuming team B wins:
1.
A: 1. M 2. S 3. S 4. S 5. S
B: 1. S 2. S 3. S 4. S 5. S

...continues as above.


Equal:
The same.


d)
Both teams have shot twice, but team A has missed both of their kicks. What's the probability team A will win?

and

Team A has shot three times and missed one. Team B has missed all three. What's the probability the match will end equal?

Offline

#2 2009-10-30 05:56:55

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A project in probability

Hi Hioj;

Can you go over the rules a little more. How does one get a penalty? Do they take alternating turns? Penalties win and goals don't?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2009-10-30 06:03:02

Sarah12
Guest

Re: A project in probability

How did The Team get A Penalty?

#4 2009-10-30 06:45:27

Hioj
Member
Registered: 2009-10-25
Posts: 16

Re: A project in probability

Thanks for trying to help me out! I'm sorry if my description was unclear. I'm from Denmark and thus I'm not sure about the correct terms used in a soccer match, but I'll try once more:

The problem is about the outcome of a soccer match. None of the teams manage to score so they get to the part of the game where each team have to shoot 5 times. They alternate, i.e. team A shoots, then team B, then team A etc. until they each have shot 5 times.

In most cases there's a probability that either team A or team B wins or the match ends equal. We have to figure these probabilities out in the following cases:

a) None has missed and team B has to shoot for the last time.
This means that team A has scored 5 times, team B has scored 4 times, so what's the probability that team A will win, that team B will win (won't happen in this case) or that the match ends equal?

b) None has missed and team B has to shoot for the 2nd last time.
Team A has scored 4 times, team B has scored 3 times, now what's the probability that team A will win, that team B will win or that the match ends equal?

c) A has missed the first shot.
A has shot only once, and missed it. Team B hasn't shot yet - 5 shots left. What's the probability that team A will win even though they missed their first shot, what's the probability that team B will win and that the match will end equal?

d) Find own cases of interest.



I hope that clarifies some things for you smile

Offline

#5 2009-10-30 07:47:06

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A project in probability

Hi Hioj;

For c) if I understand correctly each team has a 70% chance of scoring on each shot. A missed his first shot so B gets 5 shots to A's 4 and B goes first.

Last edited by bobbym (2009-10-30 07:51:17)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#6 2009-10-30 07:57:21

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: A project in probability

Bobby, it looks like you've done it as if the first team to score is the one that wins. It's not sudden death - just the best score after 5 attempts each.


Why did the vector cross the road?
It wanted to be normal.

Offline

#7 2009-10-30 07:58:06

Hioj
Member
Registered: 2009-10-25
Posts: 16

Re: A project in probability

Exactly! That's exactly what I'm looking for! Would you mind explaining your notation in the B wins and A wins?

Are you sure you can say 0.3^9 for the tie? A tie doesn't necessarily mean 10 misses, just that they each have scored the same number of goals: if team A has scored 3 and team B 3 as well, the match ends with a tie.

Offline

#8 2009-10-30 08:03:18

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A project in probability

Hi Hioj;

I didn't know that rule. That totally invalidates the above answer. My answer is for the first goal scored wins. But you do not want a sudden death either. Just seeing mathsy's post now.

Last edited by bobbym (2009-10-30 08:04:02)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#9 2009-10-31 02:16:18

Hioj
Member
Registered: 2009-10-25
Posts: 16

Re: A project in probability

Ah, ok. Any other ideas?

Offline

#10 2009-10-31 05:58:44

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: A project in probability

For the general case, I'd work out the probabilities of team A scoring 0, 1, 2, 3, 4 and 5 goals (and the same for B), then map them against each other.

Here's what it would look like for question b).

Team A:

Goals -             0         1           2          3           4           5
Probability -      0         0           0          0           0.3        0.7

Team B:

Goals -            0          1           2          3           4           5
Probability -     0          0           0          0.09      0.42       0.49

Then you'd combine those probabilities and put them into this table:

   A -->       0          1           2           3           4           5
B
|
|
V

0                0          0           0           0           0           0
                 
1                0          0           0           0           0           0

2                0          0           0           0           0           0

3                0          0           0           0           0.027     0.063

4                0          0           0           0           0.126     0.294

5                0          0           0           0           0.147     0.343

Finally, add up all the numbers above the main (bolded) diagonal for the probability that team A wins, add the numbers below it for the probability that B wins, and add the numbers on it for the probability of a tie.

ie.

A wins: 0.384
B wins: 0.147
Tie:      0.469

It's admittedly a bit overkill for this example, but the method can be used to answer any question you might think of.


Why did the vector cross the road?
It wanted to be normal.

Offline

#11 2009-10-31 07:44:56

Hioj
Member
Registered: 2009-10-25
Posts: 16

Re: A project in probability

Thanks so much for your answer! That is really helpful (question b involved the 2nd last shot from team B, you've done it as if it was their 3rd last shot, but nevermind--your example described the method perfectly). I have a few questions:

In your example, how do you find the probability to be 0.09 for team B scoring 3, 4 and 5 goals? Shouldn't their respective probability for scoring be 0.7, since all the events are independent? Thus for the 3rd goal the probability would be 0.7, 4th goal 0.49 and 5th goal 0.343.

Why does team A have a 0.3 chance of scoring in their 4th shot?


Say team B has to shoot for the 2nd last time, how does one fill out your "combined probabilities table"? I can't get a probability of team B winning, although there must be one: Team B scores on its last 2 shots, team A misses its last one.

Offline

#12 2009-10-31 08:32:21

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: A project in probability

I think you're misinterpreting my table. It shows the probabilities of each team's score, after they've already taken all of their shots.

Team B have already scored with their first three penalties, so for their final score to be 3, they need to miss with their last two. With a 0.3 chance of missing each penalty, that means there's a 0.3 * 0.3 = 0.09 chance of that happening.

For the final score to be 4, B must have done either SSSFS or SSSSF. Both of these have probability 0.3*0.7 = 0.21, so the overall probability of 4 points is 0.42.

Finally, for the score to be 5, they need to score with their final two penalties. The probability of this is 0.7*0.7 = 0.49.

The Team A table is done in the same way.

The combined table shows all the probabilities of a certain score after all penalties have been taken.
eg. The probability of the final score being 5, 4 to Team B is 0.147.


Why did the vector cross the road?
It wanted to be normal.

Offline

#13 2009-10-31 08:59:56

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A project in probability

Nice one maths.

Hi Hioj;

The first step in solving c is knowing what the approximate answers are. I ran a computer simulation of 10 000 000 trials :

These are the results.

Ties    = .2507 ± .0005

A wins = .1886 ± .0004

B wins = .5606 ± .0005


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#14 2009-10-31 09:54:01

Hioj
Member
Registered: 2009-10-25
Posts: 16

Re: A project in probability

Thanks maths! I get it now. I'll report back on my results later today or tomorrow.

Wow, bobbym, amazing. Thank you so much. How did you run that computer simulation? smile

Offline

#15 2009-10-31 10:16:08

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A project in probability

The pseudocode provided should allow anyone to translate to their favorite language.

initialize counters Awins, Bwins , Ties to 0:

Loop 10 000 000 times:

   initialize Bscores , Ascores to 0:

   Pick a random number between 0 and 1.
   Is the number <= .7 ?
     Yes: increment Bscores

    Pick a random number between 0 and 1.
    Is the number <= .7 ?
     Yes: increment Ascores
   
   Pick a random number between 0 and 1.
   Is the number <= .7 ?
     Yes: increment Bscores

    Pick a random number between 0 and 1.
    Is the number <= .7 ?
     Yes: increment Ascores

   Pick a random number between 0 and 1.
   Is the number <= .7 ?
     Yes: increment Bscores

    Pick a random number between 0 and 1.
    Is the number <= .7 ?
     Yes: increment Ascores
   
   Pick a random number between 0 and 1.
   Is the number <= .7 ?
     Yes: increment Bscores

    Pick a random number between 0 and 1.
    Is the number <= .7 ?
     Yes: increment Ascores

   Pick a random number between 0 and 1.
   Is the number <= .7 ?
     Yes: Bscores++

   Is Ascores > Bscores
      Yes: increment Awins

   Is Ascores < Bscores
      Yes: increment Bwins

   Is Ascores = Bscores
      Yes: increment Ties

Continue Loop

Display Awins / 10000000 , Bwins/10000000 , Ties/10000000

I am not suggesting anyone exactly code like this. The purpose of pseudocode is to allow anyone to translate it to any other language.


I am still working on a complete analytical solution but am not done yet.

Last edited by bobbym (2009-10-31 11:23:53)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#16 2009-10-31 11:07:20

Hioj
Member
Registered: 2009-10-25
Posts: 16

Re: A project in probability

Okay I did question c)... took quite some time, but here are my results:

    Team A wins:  0.18873
    Team B wins:  0.56057
    Tie: 0.2507

They are similar to the ones from your calculation, so I suppose they are correct! smile

Thank you so much for your help. I really appreciate it !!!

Offline

#17 2009-10-31 12:35:28

Hioj
Member
Registered: 2009-10-25
Posts: 16

Re: A project in probability

By the way, what software are you using to do that, bobbym?

Offline

#18 2009-10-31 19:53:43

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A project in probability

Hi Hioj;

Currently don't have any programming languages on my machines. Used a friends laptop and programmed it in Mathematica.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#19 2009-11-01 08:20:03

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A project in probability

Hi Hioj;

Every probability problem can be solved by a tree. There is story about Leibnitz who once made a horrific probabilty error on a simple problem because he didn't know what a tree was.

The problem with trees is that we can't draw them except for small problems because we quickly run out of space on the paper. This is my own technique for algebraically doing a tree using generating functions:

This is the GF that solves question c by algebraically simulating a tree. Where:

As = A scores
Bs = B scores
Am = A misses
BM = B misses

Of course that expression can be simplified to this

Now to do all the combinatorics we just expand the expression: I used a computer but each term below can be found by hand if necessary.

This is the expansion of the above expression:

Ok, so we have a big polynomial. How do we interpret it? For the ties we just look through the poly for As and Bs having the same exponent.

They are:

Notice that each Bs has the same exponent as each As in each term. This represents all the ties. Since in a GF the variables are only placeholders the above expression becomes:

Same technique for P(B wins):

These are all the terms where Bs has a bigger exponent than As:

Again the variables are just placeholders and can be dropped:

Now to get P(A wins) we just need to subtract but as a check I will compute it the same way:

These are all the terms where As has a bigger exponent than Bs:

Again the variables are just placeholders and can be dropped:

Now P(A wins) + P(B wins) + P(Tie) better equal one!

There is joy in Mudville! That's the answer.

Notice how close the computer simulations were.

Last edited by bobbym (2009-11-01 11:23:58)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#20 2009-11-01 08:31:53

Hioj
Member
Registered: 2009-10-25
Posts: 16

Re: A project in probability

That is very interesting! I've never heard about a tree structure before in mathematics, but I'll read up on it. Thanks for bringing such awesome solutions!

Offline

Board footer

Powered by FluxBB