Question: MATLAB CODE: Generate a 2000-sample collection of random numbers between 0 and 1, with a mean of 0.5. This version of the sample will have

MATLAB CODE: Generate a 2000-sample collection of random numbers between 0 and 1, with a mean of 0.5.
This version of the sample will have a crazy distribution (anything you like, but make sure the range is 0 to 1, and the mean is 0.5). Make a histogram of it. Then generate a second version of that 2000-sample collection, and take averages of pairs across these versions. Make histogram of that (like the lower middle of Figure 4.2). Then generate 30 versions of the 2000 sample collection, and average across set of 30, and then make a histogram of that (like the bottom right of Figure 4.2).
**You may need to shuffle (randperm) your vectors before averaging them
 MATLAB CODE: Generate a 2000-sample collection of random numbers between 0

Histogram n 1 Histogram n 2 Histogram n-30 70 60 20 16 40 30 10 0.05 0.25 0.45 0.65 0.85 more 0.05 0.25 0.45 0.65 0.85 more 0.05 0.25 0.45 0.65 0.85 more 60 40 25 25 15 10 0.05 0.25 0.45 0.65 0.85 more 0.05 0.25 0.45 0.65 0.85 more 0.05 0.25 0.45 0.65 0.85 more Bin Bin Bin Figure 4.2. Central Limit Theorem. Notwithstanding the form of the initial distribution underlying the random process, the distribution of the mean of the variables generated by this process converges to a Normal distribution as we take larger and larger samples. In the top panel we start with a Uniform distribution, while in the bottom one we begin with a V-shaped distribution. In either case, a Normal distribution emerges" as the sample size increases. Thus, the macrobehavior resulting from the aggregation of a remarkably diverse set of potential microbehaviors results in a very robust and predictable outcome-a hallmark of emergence

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!