7 coins - probability over a dollar

  • Thread starter bloynoys
  • Start date
  • Tags
    Probability
In summary, the conversation discusses the probability of a person having over a dollar in coins when given 7 coins of varying denominations. The OP provides a calculation and asks for confirmation before stating a probability. The conversation then moves on to discussing the possibility of the distribution not being normal and suggests using a simulation to check. There is also a mention of sampling techniques and the suggestion to use a distribution with a heavier tail. Finally, there is a suggestion to consider a more realistic model where the coins are not equally probable and a simulation is used to demonstrate this.
  • #1
bloynoys
25
0
Alright my brother posed this question to me tonight. You have 7 coins (for this sake we will go with the "normal" coins, penny, nickel, dime and quarter) and we are trying to find the probability that a person has over a dollar in coins.

So basically I did it and just wanted to confirm my answer before telling him tomorrow morning.

You just do:

E(x)=((1*(1/4))+(5*(1/4))+(10*(1/4))+(25*(1/4)))
E(x)= 41/5 = 10.25
7*E(x)=71.75

Var(x)=E(x^2)-E(x)^2
Var(x)=187.75-105.0625
Var(x)=82.6875
7*Var(x)=578.8125

Now I believe that I can do normal Z score stuff to find probability with the continuity correction. So we are looking for P(Z≥100) so we'll flip it into 1-P(Z≤100). Then we will add the continuity correction to make it 1-P(Z>100.5) and calculate it from there. Am I right so far?

So I go:

(71.75-100.5)/(24.058)

Z≈-1.195

And thus, using R normal probability calculator we are looking at a final answer of .1160379. Did I do that all right? Thanks!
 
Physics news on Phys.org
  • #2
Hey bloynoys.

I used R on the assumption that E[X] and Var[X} where calculated correctly (the method you used is good) and assuming the normality condition holds (which it hopefully should for 7 observations) then R gave me:

> 1 - pnorm(100,71.75,24.058)
[1] 0.1201483

However I would suggest you use continuity correction since you have discrete units instead of continuous ones (in terms of 1, 5, 25, etc units).

Are you familiar with continuity correction?
 
  • #3
Yeah I tried to apply the continuity correction to the z calculation, so it would basically move the mean to 100.5 which is what gave me the answer that I had in the first post. Does that look right to you?
 
  • #4
It does, but the only thing I am thinking about is whether the distribution isn't skewed enough to make it normal.

One way you could check this is to simulate the distribution of the sum and see if its normal.

It might sound anal, but it's just a nice thing to do for peace of mind.
 
  • #5
Is there an easy way to simulate this in R or similar? It would be interesting to see what kind of distribution it comes out as. I would hope the pennies are able to "normal" it out but hard to know.
 
  • #6
Are you aware of sampling techniques like EM or Metropolis Hastings?
 
  • #7
I am not. I am about to start my final semester of undergraduate stats education (have stats 2, stochastic processes and multivariate analysis this semester) but so far we haven't gotten to things like that. Any reading or hints you would suggest as I try to learn about these things? Not a big deal in terms of this question but seems like a good skill to understand going forward. They seem very cool from a quick perusing of the wikis.
 
  • #9
Alright, I wanted to check this fast so what I did is just write a simple program in Java to generate random numbers between 1 and 4 and then if statements to create the cent amount after 7 coins. I ran that 50000 times and got this histogram. Do you think this is approximately normal? It doesn't look entirely great and maybe a slight skew right, what do you think?

coins_zps42690c4e.jpg
 
  • #10
Yeah pretty clear it isn't close enough to normal. From just checking how many coin amounts are over 100 a few times it is always between 8 and 9 percent pretty far off from the 11-12 that it would be with the normal distribution.
 
  • #11
You might want to consider using a distribution with a heavier tail or simulate say 50,000 times and use the generated empirical distribution (i.e. the one you just simulated).
 
  • #12
In this case, a brute force approach works quite nicely. There are 47 or 16384 equiprobable outcomes, so just check each one. Here's a quick and dirty perl script:
Code:
use strict;

my $N = 4**7;
my $M = 0;
my @value = (1, 5, 10, 25);
for my $index (0 .. $N-1) {
   my $sum = 0;
   for my $ii (0 .. 6) {
      $sum += $value[$index & 3]; 
      $index >>= 2;
   }   
   $M++ if ($sum > 100);
}

printf "%d, %d, %g\n", $N, $M, $M/$N;

2101 of the 16384 outcomes have a total value of more than $1.00, so the probability is 0.128235. The approximate value from the original post (0.1160379) is good to one decimal place.
 
  • #13
D H said:
There are 47 or 16384 equiprobable outcomes, so just check each one.
If it's just 7 coins you happen to have in your pocket, in the real world those are not equiprobable. People tend to give change as well as receive it, in the process avoiding a build up of of many coins of the same denomination. A more realistic model might be one where the number of pennies is only 0-4 (and would have been equally likely but for the constraint of 7 total) etc.
 
  • #14
haruspex said:
If it's just 7 coins you happen to have in your pocket, in the real world those are not equiprobable. People tend to give change as well as receive it, in the process avoiding a build up of of many coins of the same denomination. A more realistic model might be one where the number of pennies is only 0-4 (and would have been equally likely but for the constraint of 7 total) etc.

That is another good reason to use simulation.
 
  • #15
Someone (haruspex) on this thread mentioned the right thing. In the real world, those coins are not equally probable. Guess it all depends on whether the coins are selected at random or are they real "change" from transactions.
 
  • #16
haruspex said:
If it's just 7 coins you happen to have in your pocket, in the real world those are not equiprobable.
The OP assumed an equiprobable distribution.

People tend to give change as well as receive it, in the process avoiding a build up of of many coins of the same denomination. A more realistic model might be one where the number of pennies is only 0-4 (and would have been equally likely but for the constraint of 7 total) etc.
Some people tend to give change as well as receive it. If the question is about those who adroitly manage their, the answer is zero. There's no reason to ever have more than 99 cents in loose change on hand. Others pay with bills only, instead dumping all the change they receive into their pocket or handbag. Presumably it's this latter group that the question is about. To be realistic, one would have to model how merchants price their goods. For example, you are much more likely to find something priced at $9.99 than at $10.01. One would also have to factor in things like sales taxes (which in some states vary by locale; e.g., In store A I'll get hit with a sales tax of 8.25%, in store B a few hundred yards away I'll only pay 7.75%, and in store C a mile away I'll pay 8%).

You are missing a key point by focusing on realism. That point is that a normal distribution is not a good model for this process.
 
  • #17
D H said:
...
2101 of the 16384 outcomes have a total value of more than $1.00, so the probability is 0.128235. The approximate value from the original post (0.1160379) is good to one decimal place.

A good outcome considering that the Berry-Esseen error estimate here is around 0.25
 
  • #18
D H said:
The OP assumed an equiprobable distribution.
In the attempt at solution maybe, but not in the statement of the problem. It is entirely unclear whether it is intended as equiprobable or 'suppose you have 7 coins in your pocket'. Hence my post.
 
  • #19
In this type of questions priors must always be stated otherwise you produce something like the "two envelopes problem" as an extreme case.
 
  • #20
Maybe you can simplify your calculations a bit by using the fact that you need at least two quarters to have a total to add up to $1.00 . That leaves one option : 5 dimes.
Then you can have 3 quarters , and 3^4=81 cases, or 4 quarters , and certainty.

So your winning cases of total larger than $1.00 are (using _exact_ number of quarters):

0 quarters: 0 ways , 3^7 non-ways
1 quarter : 0 ways 3^6 non-ways.
2 quarters: 1 way ( 5 10's)
3 quarters: only complicated cases
4 quarters: 3^3 ways
5 quarters: 3^2 ways, etc.

So it comes down to having four non-quarter coins adding up to $0.25-or-more.
 
  • #21
Bacle2 said:
...
So it comes down to having four non-quarter coins adding up to $0.25-or-more.

This step could be done using with generating function, ie expand [itex](x+x^5+x^{10})^4[/itex]
 
  • #22
Bacle2 said:
2 quarters: 1 way ( 5 10's)
That's not a solution because the total is exactly $1.00. The OP asks for "probability that a person has over a dollar in coins."

bpet said:
This step could be done using with generating function, ie expand [itex](x+x^5+x^{10})^4[/itex]
Even easier, don't break the problem down at all. Just use the generating function to form [itex](x+x^5+x^{10}+x^{25})^7[/itex] (expanded) and be done with it. Generating functions are magical.
 

What is the probability of getting a total value of over a dollar with 7 coins?

The probability of getting a total value of over a dollar with 7 coins depends on the types of coins being used. If all 7 coins are quarters, the probability would be 100%. If the coins are a mix of quarters, dimes, and nickels, the probability would be lower. It is important to list all possible combinations of coins and their values to accurately calculate the probability.

Is it possible to get a total value of exactly a dollar with 7 coins?

Yes, it is possible to get a total value of exactly a dollar with 7 coins. One possible combination is 4 quarters, 2 dimes, and 1 nickel. However, the probability of getting this exact value is very low compared to getting a total value over or under a dollar.

How does the probability change if the coins are flipped instead of tossed?

The probability would not change if the coins are flipped instead of tossed. As long as the coins are being randomly selected, the probability of getting a certain total value remains the same.

What is the expected value of the total amount with 7 coins?

The expected value of the total amount with 7 coins is dependent on the types of coins and their respective values. To calculate the expected value, multiply the probability of each combination by its respective value and then add all the products together. This will give an estimate of the average amount that can be expected from 7 coins.

How does the probability change if one of the coins is a rare or unique coin?

The probability would change if one of the coins is a rare or unique coin. This is because the value of the rare or unique coin would greatly impact the total value of the 7 coins. It is important to consider the value of each individual coin when calculating the probability of getting a certain total amount.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
777
  • Set Theory, Logic, Probability, Statistics
2
Replies
41
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
0
Views
990
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
266
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Back
Top