Expected value of median of rolling three fair dice

In summary, the conversation discusses the expected value of the median of rolling a die three times. The solution is found on Math Stackexchange using symmetry arguments. The median of three dice rolls is determined to be 7/2, which is confirmed through a python simulation. The conversation also addresses the use of high = 7 instead of high = 6 in the simulation, with the conclusion that any number between 6 and 7 will work.
  • #1
Master1022
611
117
Homework Statement
What is the expected value of the median of three dice rolls?
Relevant Equations
Expected Values
Hi,

I was reading this problem and I found a solution on Math Stackexchange which I don't quite understand.

Question: Calculate the expected value of the median of rolling a die three times.

Attempt:
I read the following answer on math stack exchange here
"As already noted in a comment, the result can be derived from symmetry without any calculation. The probability distribution of the die is invariant under the symmetry transformation ##x \rightarrow 7 - x##, a reflection about ##x = \frac{7}{2}##. Thus the median and the mean must also be invariant under this transformation. Thus they must be the centre of the reflection, [itex] x =\frac{7}{2} [/itex] . "I don't quite understand why this means the median of rolling three die is ##\frac{7}{2}##. I apologize if this is quite obvious, but any help would be appreciated
 
  • Like
Likes Delta2
Physics news on Phys.org
  • #2
The median of three dice would be ##21/2## by the same symmetry argument.
 
  • #3
PeroK said:
The median of three dice would be ##21/2## by the same symmetry argument.
sure, but I thought the median was a non-linear operator, so how have we arrived at that answer?
 
  • #4
Master1022 said:
sure, but I thought the median was a non-linear operator, so how have we arrived at that answer?
Symmetry!

It doesn't have to be non-linear in all cases. It's only non-linear in general.
 
  • Informative
Likes Master1022
  • #5
PeroK said:
The median of three dice would be ##21/2## by the same symmetry argument.
Sorry, I just realized I wasn't clear. When I said 3 dice rolls, I meant as in rolling the dice three times and then calculating the median of the sequence (e.g. 1, 2, 5 --> median = 2). I think 21/2 might not be correct as it is bigger than 6 so median of the three rolls shouldn't (and I dare say can't) be that...
 
  • #6
Master1022 said:
Sorry, I just realized I wasn't clear. When I said 3 dice rolls, I meant as in rolling the dice three times and then calculating the median of the sequence (e.g. 1, 2, 5 --> median = 2). I think 21/2 might not be correct as it is bigger than 6 so median of the three rolls shouldn't (and I dare say can't) be that...
Okay, of course, not added together. Then it's ##7/2## by the symmetry argument.

111 is as likely as 666
112 is as likely as 665
etc.

You ought to simulate this, with a computer script or otherwise, if you don't see it.
 
  • Like
Likes Master1022
  • #7
PeroK said:
Okay, of course, not added together. Then it's ##7/2## by the symmetry argument.

111 is as likely as 666
112 is as likely as 665
etc.

You ought to simulate this, with a computer script or otherwise, if you don't see it.
Yes that is true, I wrote a quick python simulation to test it and it does make sense now. Thanks @PeroK !

I'll just leave the code here for any future readers:
Expected Median of Three Dice Python Simulation:
# import libraries
import numpy as np

# define the number of repetitions
number_repetitions = 1000

# now make an array to store the medians
median_array = np.zeros(number_repetitions)

# start the loop
for i in range(number_repetitions):
  # get the outcomes of the three dice and append median to array
  median_array[i] = np.median(np.random.randint(low = 1, high = 7, size = (1, 3)))

print('The expected value of the median of three dice rolls is', np.average(median_array))
 
  • Like
Likes PeroK
  • #8
Master1022 said:
Yes that is true, I wrote a quick python simulation to test it and it does make sense now. Thanks @PeroK !

I'll just leave the code here for any future readers:
Expected Median of Three Dice Python Simulation:
# import libraries
import numpy as np

# define the number of repetitions
number_repetitions = 1000

# now make an array to store the medians
median_array = np.zeros(number_repetitions)

# start the loop
for i in range(number_repetitions):
  # get the outcomes of the three dice and append median to array
  median_array[i] = np.median(np.random.randint(low = 1, high = 7, size = (1, 3)))

print('The expected value of the median of three dice rolls is', np.average(median_array))

In your code, why did you set high = 7 not high = 6 in this line: median_array = np.median(np.random.randint(low = 1, high = 7, size = (1, 3)))? Since the die go from 1 to 6 not 7.
Thanks in advance for clarification.
 
  • #9
The median of any number of die rolls is 7/2. It is expected that the number of rolls greater than this number will be equal to number less than this number.

I see to recall that any number between 6 and 7 will do.
 
  • #10
Hornbein said:
The median of any number of die rolls is 7/2. It is expected that the number of rolls greater than this number will be equal to number less than this number.

I see to recall that any number between 6 and 7 will do.
I see. Thanks for your clarification.
 

1. What is the expected value of the median of rolling three fair dice?

The expected value of the median of rolling three fair dice is 3.5. This means that if you were to roll three fair dice many times, the average value of the median would be 3.5.

2. How is the expected value of the median calculated?

The expected value of the median is calculated by finding the average of all possible outcomes. In the case of rolling three fair dice, there are 216 possible outcomes, and the median is the middle value when the outcomes are arranged in ascending order. The expected value is then calculated by adding up all the possible outcomes and dividing by the total number of outcomes.

3. Why is the expected value of the median important in probability?

The expected value of the median is important in probability because it gives us an idea of what to expect when repeating a random experiment multiple times. It helps us make predictions and understand the likelihood of certain outcomes.

4. Does the expected value of the median change if the dice are biased?

Yes, the expected value of the median will change if the dice are biased. In this case, the median will no longer be 3.5, and the expected value will be different. The expected value is only 3.5 when the dice are fair and have an equal chance of landing on each side.

5. How can the expected value of the median be used in decision making?

The expected value of the median can be used in decision making to help determine the best course of action. For example, if the expected value of the median is higher for one option compared to another, it may be a better choice to choose that option. It can also be used to assess risk and make informed decisions based on probability.

Similar threads

  • Precalculus Mathematics Homework Help
2
Replies
53
Views
5K
  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
  • Precalculus Mathematics Homework Help
Replies
5
Views
3K
  • Precalculus Mathematics Homework Help
Replies
11
Views
1K
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • Precalculus Mathematics Homework Help
Replies
11
Views
2K
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
Back
Top