Question: The Julia code below generates 1000 samples with values 1, 2, 3 or 4 based on the weights, 0.1, 0.6, 0.2 and 0.1 respectively. using

The Julia code below generates 1000 samples with values "1", "2", "3" or "4" based on the weights, 0.1, 0.6, 0.2 and 0.1 respectively. using StatsBase w = weights ([0. 1, 0.6, 0.2, 0.1]) #A proportion of the number of samples equaling either 1 or 3 prop2 = sum ([sample (w) == 1 sample (w) == 3 for in _ 1: 1000])/1000 (f) Modify this case to simulate the experiment of the question (with ohm = {a, b, c, d, e}) using 10^6 replications. Based on the simulation runs, present your estimates for the probabilities in (a) - (e) and compare then to your exact answers for (a) - (e). The Julia code below generates 1000 samples with values "1", "2", "3" or "4" based on the weights, 0.1, 0.6, 0.2 and 0.1 respectively. using StatsBase w = weights ([0. 1, 0.6, 0.2, 0.1]) #A proportion of the number of samples equaling either 1 or 3 prop2 = sum ([sample (w) == 1 sample (w) == 3 for in _ 1: 1000])/1000 (f) Modify this case to simulate the experiment of the question (with ohm = {a, b, c, d, e}) using 10^6 replications. Based on the simulation runs, present your estimates for the probabilities in (a) - (e) and compare then to your exact answers for (a) - (e)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
