Open Side Menu Go to the Top
Register
Probability question with lottery Probability question with lottery

06-07-2020 , 01:04 PM
Hey guys, I have a question that I’m sure will be fairly easy for you.

Let’s say there’s a lottery that draws 5 balls from a pool of 39 balls, numbered 1 through 39. Once a ball gets pulls it can’t get pulled again.

What’s the average expected total? IE, adding all the final balls together. I’m pretty sure it’s 97.5 but I’m not positive if the fact that the balls cant be re-pulled changes anything.

Last question: what is the percent chance that the final total will be below 100.5?

Thanks in advance. I’ll Venmo 10 bucks to the first guy who gives a complete answer showing work for your time.
Probability question with lottery Quote
06-08-2020 , 11:50 AM
Hiya poogs!

The average number is (39+1)/2 and the average sum is 5x that, so 100. Lack of replacement doesn't matter.

The 2nd question is hard if one wants the exact answer, but I'm pretty sure it can be well-approximated by the Gaussian distribution (at least, I've done that for problems involving dice sums). If someone wants your easy $10, they can show how to use Gaussian here, otherwise I'll show it for free some other time.

For now I wrote a few lines of Julia code to randomly simulate it:
Code:
function poogs(n::Int64, k::Int64, total::Number, trials::Int64)
   w = 0
   for j=1:trials
      sum(randperm(n)[1:k])<total && (w+=1)
   end
   return w/trials   
end
Result: poogs(39, 5, 100.5, 10000000) = .50818508

With this distribution, the avg is the same as the median, so P(below median) = 50% + P(push)/2. With some parameters (for instance an even # instead of 39), the median isn't an integer and so the push probability is 0.
Probability question with lottery Quote
06-08-2020 , 11:57 AM
Hey what’s up dude, thank you for your help.

One thing I’m missing though is why is it 39+1? There’s 39 balls so I thought it was just 39 divided by 2 then times 5. Why do you do 40?
Probability question with lottery Quote
06-08-2020 , 01:31 PM
Direct reason: n/2 is the midpoint of 0 to n, whereas we need the midpoint of 1 to n. (If one of the balls were 0 then 39/2 would be right.)

Algebra reason: average = sum(1 to n)/n = n(n+1)/2 / n
and the n's cancel. If you're wondering why the sum is n(n+1)/2, consider sum(1 to 100). You can break it down as: 100 + (1+99) + (2+98) + ... + 50 = 5050
Probability question with lottery Quote
06-10-2020 , 12:50 AM
The exact result can be obtained by brute force just enumerating all the possible five ball combos (which are C(39,5) =575757 and so manageable) and see their score. Just a few lines in the R programming language:

Code:
combos<-combn(39,5)
scores<-colSums(combos)
#get the expected value, just to check
mean(scores)
#[1] 100
#Just to visualize the distribution
plot(table(scores))
#get the probability of the score being less then or equal to 100
mean(scores<=100)
#[1] 0.5081137
As you can see, the result is totally in line with heehaww's simulation.
Probability question with lottery Quote
06-10-2020 , 12:30 PM
Thanks to both of you guys.

I concede the point and I’m sure that you’re right but I still don’t quite see why. If you have 39 balls numbered 1-39, then there are exactly 39 balls. There’s no ball numbered zero. So I’m just confused as to why you divided 40 in half as opposed to 39.

Either way thanks and I’m sure you’re right. That’s all I needed really but I am curious still
Probability question with lottery Quote
06-10-2020 , 12:56 PM
Say you had balls numbered 1 to 3 and sample 2.

By your reasoning the average sum would be 2 *3/2 = 3.

Take all possible cases: 1+2= 3, 1+3= 4, 2+3=5.

Average =( 3+4+5)/4 = 4

The average of balls numbered 1 to 3 is 2, not 1.5.
Probability question with lottery Quote
06-10-2020 , 01:31 PM
Quote:
Originally Posted by Poogs
Thanks to both of you guys.

I concede the point and I’m sure that you’re right but I still don’t quite see why. If you have 39 balls numbered 1-39, then there are exactly 39 balls. There’s no ball numbered zero. So I’m just confused as to why you divided 40 in half as opposed to 39.

Either way thanks and I’m sure you’re right. That’s all I needed really but I am curious still
Which is the average between 0 and 1? You know, it's 0.5.

Which is the average between 2 and 3? 2.5

Which is the average between a and b? It's (a+b)/2 of course.

Which is the average between 1 and 39?
Probability question with lottery Quote
06-11-2020 , 06:24 PM
Ok that makes sense. I appreciate it.
Probability question with lottery Quote
06-12-2020 , 12:19 PM
But while I have your guys attention, one more question. Same scenario...what are the odds that the highest ball pulled is 35 or above? I get 64% but that doesn’t factor in the fact that balls can’t be pulled twice. My guess is something like 70%?
Probability question with lottery Quote
06-12-2020 , 04:49 PM
There are 5 balls that are numbered 35 and above so there are 34 below 35.

The probability all 5 drawn are below 35 is C(34,5)/C(39,5) = 48.3% (hypergeometric distribution)

Therefore, the probability that at least 1 drawn ball is numbered 35 or higher is 100% - 48.3% = 51.7%
Probability question with lottery Quote
06-15-2020 , 03:56 PM
I see it as 5/39 = .128. Times 5 is .65 or 65%. Then the fact that you can’t re-pull balls definitely helps since as every non 35 or higher ball gets pulled, the chances that one does get pulled increases. Can you explain why I’m an idiot?
Probability question with lottery Quote
06-15-2020 , 04:17 PM
The expected number of high balls is 5 x 5/39 ~ .641. You calculated that part correctly.

Sometimes you will draw more than one high ball. The chance that you draw 1-or-more high balls has to be less than .641 if you want the average number drawn to be only .641.

It can be calculated exactly: of the 575757 possible draws, 278526=48.3% produce no high balls, 231880=40.3% produce one, 59840=10.4% produce 2, 5610=1.0% produce 3, 170 produce 4, and 1 produces all five.

.483 x 0 + .403 x 1 + .104 x 2 + .010 x 3 + .0003 x 4 + .0000017 x 5 will get you back to .641.
Probability question with lottery Quote
06-16-2020 , 12:50 AM
Quote:
Originally Posted by Poogs
I see it as 5/39 = .128. Times 5 is .65 or 65%. Then the fact that you can’t re-pull balls definitely helps since as every non 35 or higher ball gets pulled, the chances that one does get pulled increases. Can you explain why I’m an idiot?
To see that you are surely wrong, redo your calculation assuming you have to score at least 30. You have 10 good balls, 10/39 = 0.256. Times 5 is more than 128%, so you more often than always will pick at least one ball 30 or higher. As already stated, you calculated the expected number of balls 30 or higher, which is different from the probability of getting at least one of them.
Probability question with lottery Quote
06-16-2020 , 01:03 PM
Ok I’m lost here. Thank you guys for helping though.

So let’s back up. There’s 39 total balls, they pick 5 of them, one at a time. Once a ball is pulled it can’t be pulled again. What are the chances that a ball numbered 35 or higher will be pulled?

First thing I would do is come up with the chances of a 35+ ball on the first pull. Since there’s 5 winning balls out of 39, I get 12.82 percent chance. Is this right so far?
Probability question with lottery Quote
06-16-2020 , 03:47 PM
Quote:
Originally Posted by Poogs
First thing I would do is come up with the chances of a 35+ ball on the first pull. Since there’s 5 winning balls out of 39, I get 12.82 percent chance. Is this right so far?
Right. The trouble starts with the 2nd ball because 2(5/39) would double-count the chance of two highballs, as shown by Siegmund in the weighted average formula.

Both balls have the same 5/39 chance of being high, but 5/39 is the chance of this ball being high and the other ball being anything (including high). That is, 5/39 = P(HL) + P(HH).

Adding 5/39 + 5/39 is the same as adding [P(HL) + P(HH)] + [P(LH) + P(HH)]

So you see that P(HH) is counted twice. And then with 3+ draws, multiplying by 5/39 counts some possibilities more than twice. No good. This overcounting is why your formula especially breaks down if you draw say 10 balls like nickthegeek pointed out. With 10 balls your chance is not 128%!

Instead of that, we can add only what wasn't already counted: P(HL or HH) + P(LH) = 5/39 + (34/39)(5/38)
Or we can take 5/39 + 5/39 - P(HH) since we've established that 10/39 double-counts P(HH).
(Or as statmanhal showed, from the start we can just calculate P(LL) and subtract it from 100%.)

If you were only interested in the 39, that would be different. You could multiply 1/39 by the # of balls picked because there wouldn't be a possibility of more than one ball being the 39.

Overcounting multi-success possibilities is also why you can't say there's a 100% chance of flipping a Tails if you flip a coin twice.

This concept is known as the principle of inclusion-exclusion: P(A or B) = P(A) + P(B) - P(A and B)
Whenever P(A and B)>0, you can't just add P(A)+P(B)
Probability question with lottery Quote
06-18-2020 , 11:36 AM
I see. Wow I was way off. Thanks for the help. So the answer is right under 52%?
Probability question with lottery Quote

      
m