Question: MATLAB only A. Write a script that uses the random function to generate 10,000 trials of 100 samples each of a normally-distributed random value with

MATLAB only

A. Write a script that uses the random function to generate 10,000 trials of 100 samples each of a normally-distributed random value with mean of 25 and standard deviation of 5. Do this without using a loop.

Assign the values to a matrix named x, such that each column is a different trial

Compute the sample mean of each of the 10,000 trials and assign these values to column vector m

Compute the sample standard deviation of each of the 10,000 trials and assign these values to column vector s

Plot a histogram of the 10,000 sample means

Plot a histogram of the 10,000 sample standard deviations

B. To provide a quantitative context for the accuracy and precision of the sample mean and sample standard deviation, compute the following and report the values using the fprintf command

compute mean of the 10,000 sample mean values and assign this to a variable Mmean

compute standard deviation of the 10,000 sample mean values and assign this to a variable SDmean

compute mean of the 10,000 sample standard deviation values and assign this to a variable Mstd

compute standard deviation of the 10,000 sample standard deviation values and assign this to a variable SDstd

store these four results in a single MATLAB variable with the code provided, A = [Mmean, SDmean, Mstd, SDstd]

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!