Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MATH 9

HoMEwoRK 5

 

Perform all of the following in a single Mathematica notebook. Use what we discussed in class: to estimate the probability that some event occurs, perform many trials, and estimate the probability as (# of times the event occurs)/(# of trials)

To estimate the expected value of some random process, perform many trials, and estimate the expected value as

(sum of all outcomes)/(# of trials)

Useful functions: Table, Length, Total, Count, N, RandomInteger, Delete Duplicates, Histogram.

 

1.  Perform the following “experiment” 1000 times: roll 3 six-sided dice and multiply their values.  Put the outcomes in a list called multDiceList. Use “Histogram” to view the distribution of the outcomes.

2.  Consider the following random process: roll 3 six-sided dice and add their values.  Define a variable probSumIs10 that estimates the probability that 10 is produced by this process. ( Use enough trials so that probSumIs10 always looks the same to at least 2 decimal places. If it changes, then use more trials.)

3. Consider the following random process: choose 3 random numbers from 1 to 10 (repeats are allowed) and then select the biggest of those 3 numbers.  Define a variable called bigThree in Mathematica that estimates the expected value of this process.  (Try computing bigThree a few times.  It should always look the same to at least 2 decimal places.  If it changes, then use more trials.  It should be close to 8 but not equal to 8.)

4. Consider the same process as in the question 3, but selecting the second biggest of the three numbers instead of the biggest.  Define a variable called middleThree in Mathematica that estimates the expected value of this middle number.

5. Consider the following random process. Choose 40 different random integers from 1 to 100. Define a variable probDistinct that estimates the probability that such a list of 40 random integers has exactly 30 or 31 different numbers.  (For example, there are exactly three different numbers appearing in the length 9 list 1, 7, 1, 2, 1, 1, 7, 2, 2.) Your estimate should be consistent to at least two decimal places.