The problem's question: What is the expected value of the second highest value rolled of five dodecahedron (12-sided) fair die with faces numbered 0 to 11?
The procedure to determine the second highest value is to sort the rolled values into descending order and then select the second value in the list. This means that the selected value may, in fact, duplicate the highest value rolled. This is, nonetheless, the correct selection.
Write the answer as a reduced fraction . 1 0 0 0 0 0 0 × numerator + denominator is the value to be given as the answer.
If the answer were 6 5 4 3 2 7 6 5 4 3 (it is not) , then enter 76543065432.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Expectation [ x , x ∼ ∼ OrderDistribution [ { DiscreteUniformDistribution [ { 0 , 1 1 } ] , 5 } , 4 ] ]
or
Mean [ Table [ Sort [ t ] [ [ 4 ] ] , { t , Tuples [ Range [ 0 , 1 1 ] , 5 ] } ] ]
In either case the reduced fraction is 1 0 3 6 8 7 7 7 5 9 .
Care to explain what these codes represent and how they are constructed?
They are Wolfram Mathematica expressions and complete descriptions of the computation. For example, doing a Google search on Mathematica Tuples yields the URL https://reference.wolfram.com/language/ref/Tuples.html which describes the Tuples command.
The first line is an executable functional description of the problem.
The second line reads from inside-out: compute all combinations (tuples) of integers going from 0 to 11 with 5 members in each tuple, make a table of each individual tuple sorted into ascending order and select the fourth (next to last) element of the sorted tuple [this computes the second highest value per the problem's description of how to compute the second highest] and compute the mean of the resultant table. The use of rational arithmetic is implicit. Wolfram Mathematica automatically reduces rational fractions.
Log in to reply
Log in to reply
Because Wolfram/Alpha isn't Wolfram Mathematica. In particular, they do not accept the same input language. The Wolfram/Alpha input language is less capable and more forgiving than Wolfram Mathematica's input language.
Wolfram Mathematica at low cost and for higher cost for PCs.
Problem Loading...
Note Loading...
Set Loading...
I use Python.