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
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