3 ms·
"If I roll this d6, what will the average be over time?" I'll be honest, that's a really dumb question for testing programming skill.
by ktRolster 10y ago
"If I roll this d6, what will the average be over time?"
I'll be honest, that's a really dumb question for testing programming skill.
- lordnacho 10y agoWe were looking for statisticians. Still not a great question, maybe. But you grab whatever is in your bag.
- a_small_island 10y ago1/6?
- ubernostrum 10y agoThe question is a weird way of asking "do you know the definition of expected value?" Expected value is calculated by taking each possible outcome, multiplying that outcome's value by its probability of occurring, and summing the results. So to calculate for a six-sided die, where each outcome has probability 1/6, you simply multiple each possible outcome by 1/6 and sum those results: (1 * 1/6) + (2 * 1/6) + (3 * 1/6) + (4 * 1/6) + (5 * 1/6) + (6 * 1/6) = 3.5 Of course no actual roll of the die will ever come up 3.5, but as you roll the die more and more times, the average of all results seen so far will begin converging on 3.5 (and given infinite rolls, that's where it would end up).
- ktRolster 10y agoYeah, if you're looking for statisticians, they should be able to figure that one out I'd guess lol