Answered step by step
Verified Expert Solution
Question
1 Approved Answer
32. (a) The MatLab exercise from week 1 asked you to simulate an experiment in which a fair dice is thrown N times and the
32. (a) The MatLab exercise from week 1 asked you to simulate an experiment in which a fair dice is thrown N times and the sample mean is calculated, and this experiment is then repeated 10,000 times. The objective of the exercise was to estimate how large N must be for the sample mean to be within 0.2 of the expected value for 95% of the experiments. A solution is as follows (some of the comments have been removed) 1 E=10000; % E is the number of experiments 2 N = 200; % N is the number of throws per experiment 3 e=0.2; %e is the error 4 A=randi ([1 6], E,N); 5 B=mean (A, 2); 6 Y=sum (B (abs (B-3.5)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started