# Compute the mean and standard deviation of the data points in the file.

8 views (last 30 days)
Jared Martin on 21 Apr 2015
Commented: James Tursa on 21 Apr 2015
Description: Given a data file with a column of measured test data (Provided by Instructor), write a program to compute the mean and standard deviation of the data points in the file. Equation 6 has been provided as a single example of how this data processing can be performed. Other ways exist, that may be better suited for large data sets or computational speed. Equation 6 requires two passes through the data which is accurate but not very efficient. Students are not required to use Equation 6 if a better method has been found. M sub x= (1/N) summation from n=0 to N-1 for x sub n (sigma x)^2= 1/(N-1) summation from n=0 to N-1 for (x sub n - M sub x)^2 sigma x = sqrt((sigma x)^2)) where: M sub x = The mean (average) of the data set. (sigma x)^2 = The variance of the data set. Sigma x = The standard deviation of the data set
The objectives of this program is as follows: 1. The program should display a title banner which has the title of Statistical Analysis 1 and some brief text that explains the functionality of the program. 2. The program should load the data file into an array, and use the data to make the mean and standard deviation calculations. 3. The program should output resulting mean and standard deviation values using the fprintf function. (a) For example the following output would be sufficient: (b) STANDARD Deviation = XX.XXXX (c) MEAN = XX.XXXX 4. Vectorize the standard deviation equations and compute the result.
##### 1 CommentShowHide None
James Tursa on 21 Apr 2015
Please make an attempt and post your code, then we can comment on it and make suggestions.