A fair die is tossed four times. What is the probability that it lands with either a 5 or 6 on top at least once?
Printable View
A fair die is tossed four times. What is the probability that it lands with either a 5 or 6 on top at least once?
I'm not sure about this but:
(N nCr X) * (P^X) * ((1-P)^(N-X))
can be used to find this where
N is the total number of throws, X the number we want and P the probability of it happening each time.
so if N=4, X=1 and P=1/3
then
answer = 0.3951
hmm.. lower than I expected. someone tell me if I'm right.
Another method that seems to make more sense. The only possible outcome that wouldn't do this is if it NEVER rolled a 5 or a 6. The chances of that is 2/3. The chances of it four times is (2/3)^4
= 0.19753
Now, we want all other outcomes so:
1-0.19753=0.80247
the binominal distribution can be used but you have to sum the probabilities for where X is 1,2,3 and 4 (but its easier to do it the other way but it only works in that special case)Quote:
Originally posted by Acidic
I'm not sure about this but:
(N nCr X) * (P^X) * ((1-P)^(N-X))
can be used to find this where
N is the total number of throws, X the number we want and P the probability of it happening each time.
so if N=4, X=1 and P=1/3
then
answer = 0.3951
hmm.. lower than I expected. someone tell me if I'm right.
thx for clearing that up for me.
Lets make this more simple.
Lets roll 4 dice, what's the chance of getting a 5 or a 6?
4*6 = 24 possibilities
4*2 = 8
8/24 = 1/3
You have a 1/3 chance.
I don't follow your logic, 4*2?Quote:
Originally posted by DiGiTaIErRoR
Lets make this more simple.
Lets roll 4 dice, what's the chance of getting a 5 or a 6?
4*6 = 24 possibilities
4*2 = 8
8/24 = 1/3
You have a 1/3 chance.
i think he means that there are 24 total possibilities (4 * 6) and 8 possibilities that it'll be a five or six (4 * 2)Quote:
Originally posted by kedaman
I don't follow your logic, 4*2?
Uhm... yea. But I think that's wrong.Quote:
Originally posted by dolor
i think he means that there are 24 total possibilities (4 * 6) and 8 possibilities that it'll be a five or six (4 * 2)
My final answer is 4/3.
And I can prove it.
VB Code:
Dim x As Long, lRnd As Long, lAvg As Long Dim c As Long, y As Long Randomize For y = 1 To 1000000 For x = 1 To 4 lRnd = Int(Rnd * 6) + 1 If lRnd = 5 Or lRnd = 6 Then c = c + 1 Next x lAvg = lAvg + c c = 0 Next y MsgBox lAvg / 1000000
I hope you stopped long enough to consider your logic. Your statement is that the probability of rolling a 5 or a 6 on four dice is equal to the SUM of the probabilities of rolling them on one... which says that not only is it MORE THAN 100% LIKELY to happen, it's even MORE MORE than 100% likely not to happen... and then the universe implodes.
Well, that or you're wrong, of course.. which you are.
Your program didn't experimentally determine anything CLOSE to the probability of getting at least one 5 or 6 in four rolls. What it does is add together the number of times a 5 or a 6 is rolled in 4,000,000 rolls, then divides the total by 1,000,000 - how is THAT useful? Try it again and instead of incrementing your total by "c", increment the total by one if "c" is greater than zero.
The probability of getting a 5 or a 6 on four dice rolls is 65/81 - you can get this mathematically using the formula of the chance of it NOT occurring during each iteration, to the power of the number of attempts... all subtracted from one.. so:
1 - (4/6)^4
Or you can write another program and be a bit more careful in it's coding before using it as proof =)
DE: even your original logic seemed better in comparison athough theyre both flawed, a 133% probability :lol:
which permutations exactly? I bet typing out all the 24 and which of 8 contain at least one 5 and 6 can't be that hard.Quote:
i think he means that there are 24 total possibilities (4 * 6) and 8 possibilities that it'll be a five or six (4 * 2)
Let X (a DRV) represent the number of times a 5 or 6 is thrown over four throws:
X ~ B(4, 1/3)
P(X > 0) = 1 - P(X = 0) = 1 - (2/3)4 = 1 - 0.1975 = 0.8025
hehe, all this and I was right (on my second method)
Indeed, I only provided my post because it seems a lot of the other posts lacked any kind of systematic method.
Yes you was, my friend :DQuote:
Originally posted by Acidic
hehe, all this and I was right (on my second method)
make a tree !!!
the usual and most easy and accurate thing. :)
we try 4 times, and if 5 or 6 is there then we dont have to finsih,
cuz the point is done !!!!
(starred(**) values should be added)
-- 5 or 6 : 1/3 (**)
-- other: 2/3
-- -- 5 or 6 : 2/3 * 1/3 (**)
here 2/3 is because in a tree we multiply the previous branch
probability
-- -- other: 2/3 * 2/3
-- -- -- 5 or 6: 2/3 * 2/3 * 1/3 (**)
-- -- -- other: 2/3 * 2/3 * 2/3
-- -- -- -- 5 or 6: 2/3 * 2/3 * 2/3 * 1/3 (**)
-- -- -- -- other: 2/3 * 2/3 * 2/3 * 2/3 (this value makes a trick)
but here is a trick, dont add the starred values.
the last value is the only chance for that condition not occuring
so probability is
1 - (2/3)^4
which is 80.2%
And after all that you rounded it wrong!
ooo! burn! ...now, i just think that's a little too picky but hey, it happens.Quote:
Originally posted by TheManWhoCan
And after all that you rounded it wrong!
i did NOT round it wrong,
i just gave it to 3 significant figures,
and for that accuracy i guess im 100% right !!!:mad:
to be more accurate its:
80.2469% :mad:
Total possible outcomes = 6+6+6+6 = 24
Favouravble outcomes = 2+2+2+2 = 8
probability = 8/24 = 1/3
:( ...fiesty, eh? c'mon, let's step it down a notchQuote:
Originally posted by ZaidGS
i did NOT round it wrong,
i just gave it to 3 significant figures,
and for that accuracy i guess im 100% right !!!:mad:
to be more accurate its:
80.2469% :mad:
yeah, after all we are here to help or solve problems for fun, not argue over small things (or getting picky ;))
the :mad: are really :bigyello: and :rolleyes: ,
but if sm1 has to be picky he should pick it right!!!! :confused:
not be so picky when he's mistaken !!!!
:blush: :blush: :blush:
I suppose you could say it's 100% probable.
The likelihood of a 5 or 6 being rolled over 4 rolls is 4/3.
Probability: A number expressing the likelihood that a specific event will occur, expressed as the ratio of the number of actual occurrences to the number of possible occurrences.
The probability of it happening on one roll is 1/3. So for every 3 rolls one actual will occur. Every four rolls more than one certain to appear.
To make a simpler analogy,
Take a coin. What's the probabilty that if you flip the coin one hundred times it'll be heads atleast once? Now, just about everyone can tell you that on average it'll occur 50 times in one hundred flips. That's 1/2*100=50.
So, 1/3*4=4/3.
Follow yet?
My code from my previous post demonstrates my logic perfectly.
Using the prior definition, there are only 6 possible occurances. However, with the four rolls, there becomes 8 possible actual occurences. 8/6 = 4/3.
A coin has 2 possible occurances, over 100 flips, that gives 100 possible actual occurances of either side. 100/2 = 50.
Right, so if the probability is 4/3 as you suggest, how come the number of actual occurences is greater than the number of possible occurences...
Your logic for the entire last post is flawed. With the coins thing, the probability you'll get heads at least once:
P(H > 0) = 1 - P(0) = 1 - (1/2)100 = 1.0000 to 4 d.p
probability is 4/3
how can it be more than 1 (100%) ?????
it can probably be if you define probability like DE does ;)
He must make his own dice with all 5's & 6's, not to mention, one that will somehow display 2 sides up @ the same time.
1/3 * 4 = 4/3? Wouldn't it really equal 4/12?
no offence
the right answer is 80.2%
no matter what you say,
its math not something to be discused freely
a right answer is a right answer !!!!
and its 80.2%
there is nothing in such a problem to get
a probability over 100% thats non-sense
even some math is concidered controversial, but in this case we can come to agreement on that the answer is precisely 65/81 :)Quote:
Originally posted by ZaidGS
no offence
the right answer is 80.2%
no matter what you say,
its math not something to be discused freely
a right answer is a right answer !!!!
and its 80.2%
there is nothing in such a problem to get
a probability over 100% thats non-sense
agreed, as everyonw should have seen from my post :D
nonsense! it's all nonsense. just look at all the different answers we've got. i mean, more than 100%?!? :rolleyes:
count :)
Code:Main> [(a,b,c,d)|a<-[1..6],b<-[1..6],c<-[1..6],d<-[1..6],a>4||b>4||c>4||d>4]
[(1,1,1,5),(1,1,1,6),(1,1,2,5),(1,1,2,6),(1,1,3,5),(1,1,3,6),(1,1,4,5),(1,1,4,6),(1,1,5,1),(1,1,5,2),(1,1,5,3),(1,1,5,4),(1,1,5,
5),(1,1,5,6),(1,1,6,1),(1,1,6,2),(1,1,6,3),(1,1,6,4),(1,1,6,5),(1,1,6,6),(1,2,1,5),(1,2,1,6),(1,2,2,5),(1,2,2,6),(1,2,3,5),(1,2,
3,6),(1,2,4,5),(1,2,4,6),(1,2,5,1),(1,2,5,2),(1,2,5,3),(1,2,5,4),(1,2,5,5),(1,2,5,6),(1,2,6,1),(1,2,6,2),(1,2,6,3),(1,2,6,4),(1,
2,6,5),(1,2,6,6),(1,3,1,5),(1,3,1,6),(1,3,2,5),(1,3,2,6),(1,3,3,5),(1,3,3,6),(1,3,4,5),(1,3,4,6),(1,3,5,1),(1,3,5,2),(1,3,5,3),(
1,3,5,4),(1,3,5,5),(1,3,5,6),(1,3,6,1),(1,3,6,2),(1,3,6,3),(1,3,6,4),(1,3,6,5),(1,3,6,6),(1,4,1,5),(1,4,1,6),(1,4,2,5),(1,4,2,6)
,(1,4,3,5),(1,4,3,6),(1,4,4,5),(1,4,4,6),(1,4,5,1),(1,4,5,2),(1,4,5,3),(1,4,5,4),(1,4,5,5),(1,4,5,6),(1,4,6,1),(1,4,6,2),(1,4,6,
3),(1,4,6,4),(1,4,6,5),(1,4,6,6),(1,5,1,1),(1,5,1,2),(1,5,1,3),(1,5,1,4),(1,5,1,5),(1,5,1,6),(1,5,2,1),(1,5,2,2),(1,5,2,3),(1,5,
2,4),(1,5,2,5),(1,5,2,6),(1,5,3,1),(1,5,3,2),(1,5,3,3),(1,5,3,4),(1,5,3,5),(1,5,3,6),(1,5,4,1),(1,5,4,2),(1,5,4,3),(1,5,4,4),(1,
5,4,5),(1,5,4,6),(1,5,5,1),(1,5,5,2),(1,5,5,3),(1,5,5,4),(1,5,5,5),(1,5,5,6),(1,5,6,1),(1,5,6,2),(1,5,6,3),(1,5,6,4),(1,5,6,5),(
1,5,6,6),(1,6,1,1),(1,6,1,2),(1,6,1,3),(1,6,1,4),(1,6,1,5),(1,6,1,6),(1,6,2,1),(1,6,2,2),(1,6,2,3),(1,6,2,4),(1,6,2,5),(1,6,2,6)
,(1,6,3,1),(1,6,3,2),(1,6,3,3),(1,6,3,4),(1,6,3,5),(1,6,3,6),(1,6,4,1),(1,6,4,2),(1,6,4,3),(1,6,4,4),(1,6,4,5),(1,6,4,6),(1,6,5,
1),(1,6,5,2),(1,6,5,3),(1,6,5,4),(1,6,5,5),(1,6,5,6),(1,6,6,1),(1,6,6,2),(1,6,6,3),(1,6,6,4),(1,6,6,5),(1,6,6,6),(2,1,1,5),(2,1,
1,6),(2,1,2,5),(2,1,2,6),(2,1,3,5),(2,1,3,6),(2,1,4,5),(2,1,4,6),(2,1,5,1),(2,1,5,2),(2,1,5,3),(2,1,5,4),(2,1,5,5),(2,1,5,6),(2,
1,6,1),(2,1,6,2),(2,1,6,3),(2,1,6,4),(2,1,6,5),(2,1,6,6),(2,2,1,5),(2,2,1,6),(2,2,2,5),(2,2,2,6),(2,2,3,5),(2,2,3,6),(2,2,4,5),(
2,2,4,6),(2,2,5,1),(2,2,5,2),(2,2,5,3),(2,2,5,4),(2,2,5,5),(2,2,5,6),(2,2,6,1),(2,2,6,2),(2,2,6,3),(2,2,6,4),(2,2,6,5),(2,2,6,6)
,(2,3,1,5),(2,3,1,6),(2,3,2,5),(2,3,2,6),(2,3,3,5),(2,3,3,6),(2,3,4,5),(2,3,4,6),(2,3,5,1),(2,3,5,2),(2,3,5,3),(2,3,5,4),(2,3,5,
5),(2,3,5,6),(2,3,6,1),(2,3,6,2),(2,3,6,3),(2,3,6,4),(2,3,6,5),(2,3,6,6),(2,4,1,5),(2,4,1,6),(2,4,2,5),(2,4,2,6),(2,4,3,5),(2,4,
3,6),(2,4,4,5),(2,4,4,6),(2,4,5,1),(2,4,5,2),(2,4,5,3),(2,4,5,4),(2,4,5,5),(2,4,5,6),(2,4,6,1),(2,4,6,2),(2,4,6,3),(2,4,6,4),(2,
4,6,5),(2,4,6,6),(2,5,1,1),(2,5,1,2),(2,5,1,3),(2,5,1,4),(2,5,1,5),(2,5,1,6),(2,5,2,1),(2,5,2,2),(2,5,2,3),(2,5,2,4),(2,5,2,5),(
2,5,2,6),(2,5,3,1),(2,5,3,2),(2,5,3,3),(2,5,3,4),(2,5,3,5),(2,5,3,6),(2,5,4,1),(2,5,4,2),(2,5,4,3),(2,5,4,4),(2,5,4,5),(2,5,4,6)
,(2,5,5,1),(2,5,5,2),(2,5,5,3),(2,5,5,4),(2,5,5,5),(2,5,5,6),(2,5,6,1),(2,5,6,2),(2,5,6,3),(2,5,6,4),(2,5,6,5),(2,5,6,6),(2,6,1,
1),(2,6,1,2),(2,6,1,3),(2,6,1,4),(2,6,1,5),(2,6,1,6),(2,6,2,1),(2,6,2,2),(2,6,2,3),(2,6,2,4),(2,6,2,5),(2,6,2,6),(2,6,3,1),(2,6,
3,2),(2,6,3,3),(2,6,3,4),(2,6,3,5),(2,6,3,6),(2,6,4,1),(2,6,4,2),(2,6,4,3),(2,6,4,4),(2,6,4,5),(2,6,4,6),(2,6,5,1),(2,6,5,2),(2,
6,5,3),(2,6,5,4),(2,6,5,5),(2,6,5,6),(2,6,6,1),(2,6,6,2),(2,6,6,3),(2,6,6,4),(2,6,6,5),(2,6,6,6),(3,1,1,5),(3,1,1,6),(3,1,2,5),(
3,1,2,6),(3,1,3,5),(3,1,3,6),(3,1,4,5),(3,1,4,6),(3,1,5,1),(3,1,5,2),(3,1,5,3),(3,1,5,4),(3,1,5,5),(3,1,5,6),(3,1,6,1),(3,1,6,2)
,(3,1,6,3),(3,1,6,4),(3,1,6,5),(3,1,6,6),(3,2,1,5),(3,2,1,6),(3,2,2,5),(3,2,2,6),(3,2,3,5),(3,2,3,6),(3,2,4,5),(3,2,4,6),(3,2,5,
1),(3,2,5,2),(3,2,5,3),(3,2,5,4),(3,2,5,5),(3,2,5,6),(3,2,6,1),(3,2,6,2),(3,2,6,3),(3,2,6,4),(3,2,6,5),(3,2,6,6),(3,3,1,5),(3,3,
1,6),(3,3,2,5),(3,3,2,6),(3,3,3,5),(3,3,3,6),(3,3,4,5),(3,3,4,6),(3,3,5,1),(3,3,5,2),(3,3,5,3),(3,3,5,4),(3,3,5,5),(3,3,5,6),(3,
3,6,1),(3,3,6,2),(3,3,6,3),(3,3,6,4),(3,3,6,5),(3,3,6,6),(3,4,1,5),(3,4,1,6),(3,4,2,5),(3,4,2,6),(3,4,3,5),(3,4,3,6),(3,4,4,5),(
3,4,4,6),(3,4,5,1),(3,4,5,2),(3,4,5,3),(3,4,5,4),(3,4,5,5),(3,4,5,6),(3,4,6,1),(3,4,6,2),(3,4,6,3),(3,4,6,4),(3,4,6,5),(3,4,6,6)
,(3,5,1,1),(3,5,1,2),(3,5,1,3),(3,5,1,4),(3,5,1,5),(3,5,1,6),(3,5,2,1),(3,5,2,2),(3,5,2,3),(3,5,2,4),(3,5,2,5),(3,5,2,6),(3,5,3,
1),(3,5,3,2),(3,5,3,3),(3,5,3,4),(3,5,3,5),(3,5,3,6),(3,5,4,1),(3,5,4,2),(3,5,4,3),(3,5,4,4),(3,5,4,5),(3,5,4,6),(3,5,5,1),(3,5,
5,2),(3,5,5,3),(3,5,5,4),(3,5,5,5),(3,5,5,6),(3,5,6,1),(3,5,6,2),(3,5,6,3),(3,5,6,4),(3,5,6,5),(3,5,6,6),(3,6,1,1),(3,6,1,2),(3,
6,1,3),(3,6,1,4),(3,6,1,5),(3,6,1,6),(3,6,2,1),(3,6,2,2),(3,6,2,3),(3,6,2,4),(3,6,2,5),(3,6,2,6),(3,6,3,1),(3,6,3,2),(3,6,3,3),(
3,6,3,4),(3,6,3,5),(3,6,3,6),(3,6,4,1),(3,6,4,2),(3,6,4,3),(3,6,4,4),(3,6,4,5),(3,6,4,6),(3,6,5,1),(3,6,5,2),(3,6,5,3),(3,6,5,4)
,(3,6,5,5),(3,6,5,6),(3,6,6,1),(3,6,6,2),(3,6,6,3),(3,6,6,4),(3,6,6,5),(3,6,6,6),(4,1,1,5),(4,1,1,6),(4,1,2,5),(4,1,2,6),(4,1,3,
5),(4,1,3,6),(4,1,4,5),(4,1,4,6),(4,1,5,1),(4,1,5,2),(4,1,5,3),(4,1,5,4),(4,1,5,5),(4,1,5,6),(4,1,6,1),(4,1,6,2),(4,1,6,3),(4,1,
6,4),(4,1,6,5),(4,1,6,6),(4,2,1,5),(4,2,1,6),(4,2,2,5),(4,2,2,6),(4,2,3,5),(4,2,3,6),(4,2,4,5),(4,2,4,6),(4,2,5,1),(4,2,5,2),(4,
2,5,3),(4,2,5,4),(4,2,5,5),(4,2,5,6),(4,2,6,1),(4,2,6,2),(4,2,6,3),(4,2,6,4),(4,2,6,5),(4,2,6,6),(4,3,1,5),(4,3,1,6),(4,3,2,5),(
4,3,2,6),(4,3,3,5),(4,3,3,6),(4,3,4,5),(4,3,4,6),(4,3,5,1),(4,3,5,2),(4,3,5,3),(4,3,5,4),(4,3,5,5),(4,3,5,6),(4,3,6,1),(4,3,6,2)
,(4,3,6,3),(4,3,6,4),(4,3,6,5),(4,3,6,6),(4,4,1,5),(4,4,1,6),(4,4,2,5),(4,4,2,6),(4,4,3,5),(4,4,3,6),(4,4,4,5),(4,4,4,6),(4,4,5,
1),(4,4,5,2),(4,4,5,3),(4,4,5,4),(4,4,5,5),(4,4,5,6),(4,4,6,1),(4,4,6,2),(4,4,6,3),(4,4,6,4),(4,4,6,5),(4,4,6,6),(4,5,1,1),(4,5,
1,2),(4,5,1,3),(4,5,1,4),(4,5,1,5),(4,5,1,6),(4,5,2,1),(4,5,2,2),(4,5,2,3),(4,5,2,4),(4,5,2,5),(4,5,2,6),(4,5,3,1),(4,5,3,2),(4,
5,3,3),(4,5,3,4),(4,5,3,5),(4,5,3,6),(4,5,4,1),(4,5,4,2),(4,5,4,3),(4,5,4,4),(4,5,4,5),(4,5,4,6),(4,5,5,1),(4,5,5,2),(4,5,5,3),(
4,5,5,4),(4,5,5,5),(4,5,5,6),(4,5,6,1),(4,5,6,2),(4,5,6,3),(4,5,6,4),(4,5,6,5),(4,5,6,6),(4,6,1,1),(4,6,1,2),(4,6,1,3),(4,6,1,4)
,(4,6,1,5),(4,6,1,6),(4,6,2,1),(4,6,2,2),(4,6,2,3),(4,6,2,4),(4,6,2,5),(4,6,2,6),(4,6,3,1),(4,6,3,2),(4,6,3,3),(4,6,3,4),(4,6,3,
5),(4,6,3,6),(4,6,4,1),(4,6,4,2),(4,6,4,3),(4,6,4,4),(4,6,4,5),(4,6,4,6),(4,6,5,1),(4,6,5,2),(4,6,5,3),(4,6,5,4),(4,6,5,5),(4,6,
5,6),(4,6,6,1),(4,6,6,2),(4,6,6,3),(4,6,6,4),(4,6,6,5),(4,6,6,6),(5,1,1,1),(5,1,1,2),(5,1,1,3),(5,1,1,4),(5,1,1,5),(5,1,1,6),(5,
1,2,1),(5,1,2,2),(5,1,2,3),(5,1,2,4),(5,1,2,5),(5,1,2,6),(5,1,3,1),(5,1,3,2),(5,1,3,3),(5,1,3,4),(5,1,3,5),(5,1,3,6),(5,1,4,1),(
5,1,4,2),(5,1,4,3),(5,1,4,4),(5,1,4,5),(5,1,4,6),(5,1,5,1),(5,1,5,2),(5,1,5,3),(5,1,5,4),(5,1,5,5),(5,1,5,6),(5,1,6,1),(5,1,6,2)
,(5,1,6,3),(5,1,6,4),(5,1,6,5),(5,1,6,6),(5,2,1,1),(5,2,1,2),(5,2,1,3),(5,2,1,4),(5,2,1,5),(5,2,1,6),(5,2,2,1),(5,2,2,2),(5,2,2,
3),(5,2,2,4),(5,2,2,5),(5,2,2,6),(5,2,3,1),(5,2,3,2),(5,2,3,3),(5,2,3,4),(5,2,3,5),(5,2,3,6),(5,2,4,1),(5,2,4,2),(5,2,4,3),(5,2,
4,4),(5,2,4,5),(5,2,4,6),(5,2,5,1),(5,2,5,2),(5,2,5,3),(5,2,5,4),(5,2,5,5),(5,2,5,6),(5,2,6,1),(5,2,6,2),(5,2,6,3),(5,2,6,4),(5,
2,6,5),(5,2,6,6),(5,3,1,1),(5,3,1,2),(5,3,1,3),(5,3,1,4),(5,3,1,5),(5,3,1,6),(5,3,2,1),(5,3,2,2),(5,3,2,3),(5,3,2,4),(5,3,2,5),(
5,3,2,6),(5,3,3,1),(5,3,3,2),(5,3,3,3),(5,3,3,4),(5,3,3,5),(5,3,3,6),(5,3,4,1),(5,3,4,2),(5,3,4,3),(5,3,4,4),(5,3,4,5),(5,3,4,6)
,(5,3,5,1),(5,3,5,2),(5,3,5,3),(5,3,5,4),(5,3,5,5),(5,3,5,6),(5,3,6,1),(5,3,6,2),(5,3,6,3),(5,3,6,4),(5,3,6,5),(5,3,6,6),(5,4,1,
1),(5,4,1,2),(5,4,1,3),(5,4,1,4),(5,4,1,5),(5,4,1,6),(5,4,2,1),(5,4,2,2),(5,4,2,3),(5,4,2,4),(5,4,2,5),(5,4,2,6),(5,4,3,1),(5,4,
3,2),(5,4,3,3),(5,4,3,4),(5,4,3,5),(5,4,3,6),(5,4,4,1),(5,4,4,2),(5,4,4,3),(5,4,4,4),(5,4,4,5),(5,4,4,6),(5,4,5,1),(5,4,5,2),(5,
4,5,3),(5,4,5,4),(5,4,5,5),(5,4,5,6),(5,4,6,1),(5,4,6,2),(5,4,6,3),(5,4,6,4),(5,4,6,5),(5,4,6,6),(5,5,1,1),(5,5,1,2),(5,5,1,3),(
5,5,1,4),(5,5,1,5),(5,5,1,6),(5,5,2,1),(5,5,2,2),(5,5,2,3),(5,5,2,4),(5,5,2,5),(5,5,2,6),(5,5,3,1),(5,5,3,2),(5,5,3,3),(5,5,3,4)
,(5,5,3,5),(5,5,3,6),(5,5,4,1),(5,5,4,2),(5,5,4,3),(5,5,4,4),(5,5,4,5),(5,5,4,6),(5,5,5,1),(5,5,5,2),(5,5,5,3),(5,5,5,4),(5,5,5,
5),(5,5,5,6),(5,5,6,1),(5,5,6,2),(5,5,6,3),(5,5,6,4),(5,5,6,5),(5,5,6,6),(5,6,1,1),(5,6,1,2),(5,6,1,3),(5,6,1,4),(5,6,1,5),(5,6,
1,6),(5,6,2,1),(5,6,2,2),(5,6,2,3),(5,6,2,4),(5,6,2,5),(5,6,2,6),(5,6,3,1),(5,6,3,2),(5,6,3,3),(5,6,3,4),(5,6,3,5),(5,6,3,6),(5,
6,4,1),(5,6,4,2),(5,6,4,3),(5,6,4,4),(5,6,4,5),(5,6,4,6),(5,6,5,1),(5,6,5,2),(5,6,5,3),(5,6,5,4),(5,6,5,5),(5,6,5,6),(5,6,6,1),(
5,6,6,2),(5,6,6,3),(5,6,6,4),(5,6,6,5),(5,6,6,6),(6,1,1,1),(6,1,1,2),(6,1,1,3),(6,1,1,4),(6,1,1,5),(6,1,1,6),(6,1,2,1),(6,1,2,2)
,(6,1,2,3),(6,1,2,4),(6,1,2,5),(6,1,2,6),(6,1,3,1),(6,1,3,2),(6,1,3,3),(6,1,3,4),(6,1,3,5),(6,1,3,6),(6,1,4,1),(6,1,4,2),(6,1,4,
3),(6,1,4,4),(6,1,4,5),(6,1,4,6),(6,1,5,1),(6,1,5,2),(6,1,5,3),(6,1,5,4),(6,1,5,5),(6,1,5,6),(6,1,6,1),(6,1,6,2),(6,1,6,3),(6,1,
6,4),(6,1,6,5),(6,1,6,6),(6,2,1,1),(6,2,1,2),(6,2,1,3),(6,2,1,4),(6,2,1,5),(6,2,1,6),(6,2,2,1),(6,2,2,2),(6,2,2,3),(6,2,2,4),(6,
2,2,5),(6,2,2,6),(6,2,3,1),(6,2,3,2),(6,2,3,3),(6,2,3,4),(6,2,3,5),(6,2,3,6),(6,2,4,1),(6,2,4,2),(6,2,4,3),(6,2,4,4),(6,2,4,5),(
6,2,4,6),(6,2,5,1),(6,2,5,2),(6,2,5,3),(6,2,5,4),(6,2,5,5),(6,2,5,6),(6,2,6,1),(6,2,6,2),(6,2,6,3),(6,2,6,4),(6,2,6,5),(6,2,6,6)
Code:,(6,3,1,1),(6,3,1,2),(6,3,1,3),(6,3,1,4),(6,3,1,5),(6,3,1,6),(6,3,2,1),(6,3,2,2),(6,3,2,3),(6,3,2,4),(6,3,2,5),(6,3,2,6),(6,3,3,
1),(6,3,3,2),(6,3,3,3),(6,3,3,4),(6,3,3,5),(6,3,3,6),(6,3,4,1),(6,3,4,2),(6,3,4,3),(6,3,4,4),(6,3,4,5),(6,3,4,6),(6,3,5,1),(6,3,
5,2),(6,3,5,3),(6,3,5,4),(6,3,5,5),(6,3,5,6),(6,3,6,1),(6,3,6,2),(6,3,6,3),(6,3,6,4),(6,3,6,5),(6,3,6,6),(6,4,1,1),(6,4,1,2),(6,
4,1,3),(6,4,1,4),(6,4,1,5),(6,4,1,6),(6,4,2,1),(6,4,2,2),(6,4,2,3),(6,4,2,4),(6,4,2,5),(6,4,2,6),(6,4,3,1),(6,4,3,2),(6,4,3,3),(
6,4,3,4),(6,4,3,5),(6,4,3,6),(6,4,4,1),(6,4,4,2),(6,4,4,3),(6,4,4,4),(6,4,4,5),(6,4,4,6),(6,4,5,1),(6,4,5,2),(6,4,5,3),(6,4,5,4)
,(6,4,5,5),(6,4,5,6),(6,4,6,1),(6,4,6,2),(6,4,6,3),(6,4,6,4),(6,4,6,5),(6,4,6,6),(6,5,1,1),(6,5,1,2),(6,5,1,3),(6,5,1,4),(6,5,1,
5),(6,5,1,6),(6,5,2,1),(6,5,2,2),(6,5,2,3),(6,5,2,4),(6,5,2,5),(6,5,2,6),(6,5,3,1),(6,5,3,2),(6,5,3,3),(6,5,3,4),(6,5,3,5),(6,5,
3,6),(6,5,4,1),(6,5,4,2),(6,5,4,3),(6,5,4,4),(6,5,4,5),(6,5,4,6),(6,5,5,1),(6,5,5,2),(6,5,5,3),(6,5,5,4),(6,5,5,5),(6,5,5,6),(6,
5,6,1),(6,5,6,2),(6,5,6,3),(6,5,6,4),(6,5,6,5),(6,5,6,6),(6,6,1,1),(6,6,1,2),(6,6,1,3),(6,6,1,4),(6,6,1,5),(6,6,1,6),(6,6,2,1),(
6,6,2,2),(6,6,2,3),(6,6,2,4),(6,6,2,5),(6,6,2,6),(6,6,3,1),(6,6,3,2),(6,6,3,3),(6,6,3,4),(6,6,3,5),(6,6,3,6),(6,6,4,1),(6,6,4,2)
,(6,6,4,3),(6,6,4,4),(6,6,4,5),(6,6,4,6),(6,6,5,1),(6,6,5,2),(6,6,5,3),(6,6,5,4),(6,6,5,5),(6,6,5,6),(6,6,6,1),(6,6,6,2),(6,6,6,
3),(6,6,6,4),(6,6,6,5),(6,6,6,6)]
(90889 reductions, 162987 cells, 1 garbage collection)
Main>
Eh.
You nut.
whatever happened to some of the ones w/o a 5 or 6 like (1,1,1,1) ?Quote:
Originally posted by kedaman
count :)
Code:Main> [(a,b,c,d)|a<-[1..6],b<-[1..6],c<-[1..6],d<-[1..6],a>4||b>4||c>4||d>4]
[(1,1,1,5),(1,1,1,6),(1,1,2,5),(1,1,2,6),(1,1,3,5),(1,1,3,6),(1,1,4,5),(1,1,4,6),(1,1,5,1),(1,1,5,2),(1,1,5,3),(1,1,5,4),(1,1,5,
5),(1,1,5,6),(1,1,6,1),(1,1,6,2),(1,1,6,3),(1,1,6,4),(1,1,6,5),(1,1,6,6),(1,2,1,5),(1,2,1,6),(1,2,2,5),(1,2,2,6),(1,2,3,5),(1,2,
3,6),(1,2,4,5),(1,2,4,6),(1,2,5,1),(1,2,5,2),(1,2,5,3),(1,2,5,4),(1,2,5,5),(1,2,5,6),(1,2,6,1),(1,2,6,2),(1,2,6,3),(1,2,6,4),(1,
they were excluded from the list with the condition a>4||b>4||c>4||d>4
Uhm. 4/12 = 1/3. Rofl.Quote:
Originally posted by Spajeoly
He must make his own dice with all 5's & 6's, not to mention, one that will somehow display 2 sides up @ the same time.
1/3 * 4 = 4/3? Wouldn't it really equal 4/12?
1/3 * 4/1
Code:1*4 4
- - = -
3*1 3
Consider my example, 100 coin flips, what's the probability that you'll get heads atleast once? Well, heads will occur 50 times(on average), so I suppose you can say 100%.Quote:
Originally posted by sw_is_great
probability is 4/3
how can it be more than 1 (100%) ?????
You people are using the wrong method to figure out this particular probility. Your setups are calculating a desired result for each roll. But the problem only needs it to happen on one roll.
yeah, my bad, i was on 1 hour of sleep when I did that.Quote:
Originally posted by DiGiTaIErRoR
Uhm. 4/12 = 1/3. Rofl.
1/3 * 4/1
Code:1*4 4
- - = -
3*1 3
See, that's the trick you need to learn, admit when you're wrong. Nothing can have a 125% of happening.
I've even commented my code. :lol:Quote:
Originally posted by Spajeoly
yeah, my bad, i was on 1 hour of sleep when I did that.
See, that's the trick you need to learn, admit when you're wrong. Nothing can have a 125% of happening.
Run this code:
VB Code:
Dim x As Long, lRnd As Long, lAvg As Long Dim c As Long, y As Long Randomize For y = 1 To 1000000 'Four rolls For x = 1 To 4 'compute random number 1 to 6 lRnd = Int(Rnd * 6) + 1 'if roll is 5 or 6, add it to the counter, c If lRnd = 5 Or lRnd = 6 Then c = c + 1 Next x 'add counters together, so we can get an average lAvg = lAvg + c 'reset counter c = 0 Next y MsgBox lAvg / 1000000 ' display average 5 or 6 per four rolls
You'll get a messagebox with ~1.33.
Wow, seems that when you get 4 random numbers, 1 to 6, that 5 or 6 will appear 133% of the time.
Not surprising. Since the single probability is 1/3. And you roll it four times. Thus for every three rolls(1/3) it'll happen once, so every four rolls it'll happen more than once, wow, 1/3*4=4/3 too easy.
Ok. I don't want to repeat myself too much.
:lol:
When looking at total posibilities, keep in mind that you may have already succeeded in the previous roll.
On 1st roll, you have have 3 possibles (3^1 = 3). You have 1/3 chances of success = 1/3 * 3 = 1. Probability is chances of success divided by possibles = 1/3.
On 2nd roll, you have have 9 possibles (3^2 = 9). You have 1/3 chances of already having succeeded on 1st roll = 1/3 * 9 = 3. You also have 1/3 chance of success on remaining possibles (9-3 = 6) = 1/3 * 6 = 2. Total chances of success are 3+2=5. Probability is chances of success divided by possibles = 5/9.
On 3rd roll, you have have 27 possibles (3^3 = 27). You have 1/3 chances of already having succeeded on 1st roll = 1/3 * 27 = 9. You also have 1/3 chance of success on remaining possibles (27-9 = 18) = 1/3 * 18 = 6. You also have 1/3 chance of success on remaining possibles (9 used on 1st + 6 used on 2nd = 15 used. 27-15 = 12) = 1/3 * 12 = 4. Total chances of success are 9+6+4 = 19. Probability is chances of success divided by possibles = 19/27.
On 4th roll, you have have 81 possibles (3^4 = 81). You have 1/3 chances of already having succeeded on 1st roll = 1/3 * 81 = 27. You also have 1/3 chance of success on remaining possibles (81-27 = 54) = 1/3 * 54 = 18. You also have 1/3 chance of success on remaining possibles (27 used on 1st + 18 used on 2nd = 45 used. 81-45 = 36) = 1/3 * 36 = 12. You also have 1/3 chance of success on remaining possibles (27 + 18 + 12 = 57 used. 81-45 = 24) = 1/3 * 24 = 8. Total chances of success are 27+18+12+8 = 65. Probability is chances of success divided by possibles = 65/81.
I'm not sure how to express this in an equation, but it would be like this:
Let r’ = rolls
Let t = total possible combinations
Let p = probability of success for one roll
Let c = chance of success
t =3^r
p =1/3
r0 = 0
r1 = ((t-r0)*p) + r0
r2 = ((t-r1)*p) + r1
r3 = ((t-r2)*p) + r2
r4 = ((t-r3)*p) + r3
etc…
c = r’ / t
So for roll 4 you would have
t =81
r0 = 0
r1 = (81-0) * 1/3 = 27 + 0 = 27 (27/81 probability = .3333 or 1/3)
r2 = (81-27) * 1/3 = 18 + 27 = 45 (45/81 probability = .5555 or 5/9)
r3 = (81-45) * 1/3 = 12 + 45= 57 (57/81 probability = .7037 or 19/27)
r4 = (81-57) * 1/3 = 8 + 57 = 65 (65/81 probability = .8025 or 65/81)
So it is like Acidic & Kedaman posted in the begining.
DE: you need to check up the definition of probability.
and here's a final confirmation (enumerating the perms in Haskell) that the probability is... *drum roll*
Code:Main> fromInt(length [(a,b,c,d)|a<-[1..6],b<-[1..6],c<-[1..6],d<-[1..6],a>4||b>4||c>4||d>4])/6^4
0.802469
Gee, i hope no-one asks "How many ppl do you need before you are >50% likely to have 2 with the same birthday"...
Why? because the reasoning is EXACTLY the same. Just take the inverse.
P(5 OR 6) = 1 - P(not 5 nor 6) **for 4 rolls**
for a single roll, P(not 5 nor 6) = 4/6 = 2/3
=> for 4 rolls: (not 5 or 6) AND (not 5 or 6) AND (not 5 or 6) AND (not 5 or 6) = (2/3) ^ 4 = 16/81
=> 1-16/81 = surprise surprise : 65/81!!! :eek:
P.S DE: change ur code so that if multiple 5s/6s are rolled in the same group of 4, that c doesn't increase by more than 1.
DE, I ran your code after adapting it to Excel while @ work, it does what you say it does, but as lall here says, change ur code so that if multiple 5s/6s are rolled in the same group of 4, that c doesn't increase by more than 1.
VB Code:
Dim x As Long, lRnd As Long, lAvg As Long Dim c As Long, y As Long Randomize For y = 1 To 1000000 'This is fine For x = 1 To 4 'This is fine lRnd = Int(Rnd * 6) + 1 'if roll is 5 or 6, add it to the counter, c If lRnd = 5 Or lRnd = 6 Then c = c + 1 Next x 'add only one to the fücking sum if we have any. If c > 0 Then lAvg = lAvg + 1 'This is fine c = 0 Next y MsgBox lAvg / 1000000 ' display the CORRECT average 5 or 6 per four rolls
I think we should all give up and let DE sit in his world, at least until he takes his reality meds.
I think this is simple
lets solve it like this ....
if we suppose that we throw only one die then
probability for 5 or 6 = 2/6 = 1/3
if we throw two dicethen
probability = (2+2)/(6+6) = 4/12 = 1/3
||ly
for 4 dice it will be 1/3
Ok, modified code, I get .802....
:o
+ means "disjunct two mutually exclusive outcomes" so it would be chosing one of the 4 die and throwing it.Quote:
Originally posted by sw_is_great
I think this is simple
lets solve it like this ....
if we suppose that we throw only one die then
probability for 5 or 6 = 2/6 = 1/3
if we throw two dicethen
probability = (2+2)/(6+6) = 4/12 = 1/3
||ly
for 4 dice it will be 1/3
why must you complicate a problem that is already so simplified...
1-(2/3)^4 ...tada! Jeebus.
a formula means so much more if there is an explanation for itQuote:
Originally posted by dolor
why must you complicate a problem that is already so simplified...
1-(2/3)^4 ...tada! Jeebus.
yea, but isn't there a point in your life when you stopped trying to explain why the derivative of 2x = 2 ? ..idunno, that was just an example.Quote:
Originally posted by kedaman
a formula means so much more if there is an explanation for it
I think this thread should be removed because it's almost entirely full of ****!
if you hadn't said that, this thread would have kept going down the page and ended up in the abyss of "next page". Just let it slowly dissappear.
Look who talkin'.Quote:
Originally posted by TheManWhoCan
I think this thread should be removed because it's almost entirely full of ****!