P61299 Rolling All the Numbers link reply
On average, how many times do you need to roll a die before all six different numbers have turned up?
P61310 link reply
I'm a brainlet but here goes.

6 sides means 1/6 chance of rolling that side (aka number).
1/6 means ~16.7%. That's a single roll.
How many rolls until we reach or exceed 100%? ~6 rolls.
So 6 rolls per side, 6 sides, that's a total of 36 rolls in the worst case?
On average, well the minimum is 6 rolls (6 perfect rolls giving you a previously unseen number each time) and a maximum of 36... so the average should be 22 rolls.
P61326 link reply
P61310
there is no maximum
you could roll the die forever and never get all 6 numbers
P61327 link reply
P61326
We're talking about a loaded die at that point, right?
P61329 link reply
P61310
damn, what retarded logic
if we are gonna let brainlets into /math/ then ill also throw in my retarded solution (except this one is correct)

ahem
14.699436
thats the exact number
source: the program i wrote to simulate this shit 10000000 times
P61330 link reply
P61326
hey this gave me an idea
find the function the gives the chance of it taking exactly x times to get all 6 numbers
then you can integrate that bitch and something else to get the average
P61331 link reply
P61330
nvm this is hard
P61355 link reply
P61329
>damn, what retarded logic
>14.699436

Now I wonder where exactly I went wrong. Where's a math teacher when you need her.
P61357 link reply
The probability to roll n different numbers in k tries is:
n
1 2 3 4
1 1
2 1/6 5/6
k 3 1/36 15/36 20/36
4 1/216 35/216 120/216 60/216

That is, [tex:p(n+1,k+1) = p(n,k)*\frac{6-n}{6} + p(n+1,k)*\frac{n}{6}]

Finding an explicit form seems like a pain
P61387 link reply
>Now I wonder where exactly I went wrong.
read the fucking thread nigger
P61326 already did you the kindness of pointing out
i could write at length about how everything you wrote on P61310 is dumb and stupid
but i dont feel like it rn
P61406 link reply
P61387
>but i dont feel like it rn
Well maybe you wouldn't be doing it just for me but OK, whenever you feel like it.
P61426 link reply
P61387
>P61326 already did you the kindness of pointing out
No, and if you still think so then it's you who is dumb and stupid. Why not? Because the question was about the [bold: AVERAGE] so put your glasses on, pay attention, touch grass and learn to read.
P61427 link reply
P61426
sweet divine mercy
good thing this isnt the /lit/ board bc this level of braindead reading comprehension should warrant a permaban
ig the nanotrannification of lambda+js was a disaster for the userbase
i swear ppl posting on /math/ werent this retarded before
P61428 link reply
P61406
Where you weent wrong is this:
>How many rolls until we reach or exceed 100%? ~6 rolls.
Each roll is a separate event, independent of previous ones. Each time, you have a 1/6 probability of rolling a particular number. It doesn't add with successive rolls. The die doesn't have a memory of what it rolled previously. If it did, you could cheat at games that use dice by rolling several of them five or more times and collecting the ones that had up to that point rolled every number except the one you want, then substituting them discreetly when you want that number. They would not be detectable as loaded however because after that they would not show any bias for a particular number.

The type of random you are thinking of can be simulated, and it produces a more aesthetically pleasing appearance, compared to the randomness of rolling a die. Compare the two images and see if you agree that it looks better.
P61437 link reply
P61357
>Finding an explicit form seems like a pain
Lucky for you, I did it in the past for a sort of similar question I had.

Suppose you have m symbols, a string of length n and you want that string to have j symbols. The number of such strings is given by pic related.

In this case m=6, so one gets:
C(n, 1) = 6
C(n, 2) = 6*5*(2^(n-1)-1)
C(n, 3) = 6*5*4*(3^(n-1)/2-2^(n-1)+1/2)
C(n, 4) = 6*5*4*3*(4^(n-1)/6-3^(n-1)/2+2^(n-1)/2-1/6)
C(n, 5) = 6*5*4*3*2*(5^(n-1)/24-4^(n-1)/6+3^(n-1)/4-2^(n-1)/6+1/24)
C(n, 6) = 6*5*4*3*2*1*(6^(n-1)/120-5^(n-1)/24+4^(n-1)/12-3^(n-1)/12+2^(n-1)/24-1/120)
C(n, j) = 0 for other j.

To get probabilities you just divide by 6^n.
P61442 link reply
P61428
thanks for explaining his stupidity so i didnt have to
P61453 link reply
P61428
Thanks for explaining. I'm curious if you reached the same solution as P61355.
P61454 link reply
(Meant to link P61329)
>14.699436
P61582 link reply
P61453
Applying P61437's formula, I get 14.7

#!/bin/python3

def C(n):
if (n<6):
return 0
else:
return (6*5*4*3*2*((6**(n-1))/120-(5**(n-1))/24+(4**(n-1))/12-(3**(n-1))/12+(2**(n-1))/24-1/120))/(6**n)

E = 0
for i in range(6, 200):
E += i*(C(i)-C(i-1))
print(i,C(i))

print(E)
P61602 link reply
>>P61582
python3 lol cringe
P61659 link reply
P61602
Can someone decrypt this please? I don't want malware on my phone if I can help it.
P61666 link reply
P61659
>https://watch.goodluckgabe.life/videos/watch/ca022f95-dcc5-4dcc-98bc-b2d03722d766
lol wtf its a peertube video of a guy doing asmr cum tribute to 911 haha
P61850 Python3 is awesome link reply
P61659

It's a zipbomb, run!

12of7 P62683 link reply
P61299
for a perfectly weighted cube die, as long as you keep your roll constant (constant newtons [bold:I hate that guy] of force), at the same angle and at the same everything, except for the side that is up of the die, you should be able to get each and every side each in 6 throws

yet, IRL, there are multiple variables that come to get calculated, such as: the centre of gravity for the die, how close to symetrical perfection is the die, on inpact, how is the die affected elastically and plastically, as well as the surface it interacts with, what's the temperature of the die, surface, gas/liquid the die is sorounded by that separates the surface and the die etc etc

There are a lot of variables to calculate and each and every die roll is unique due to all of these factors, and even more that mathematicaly would take quite a bit to calculate even with a computer

Best method is either IRL analysis or Simulation with changing variables and getting the average from there, yet the IRL analysis would take days, weeks, months or even years while the Simulations would take an hours, maybe two, maybe ten maybe a full day or even a full week before there are enough results to satisfy the analist, at which point the average shall be calculated
x