Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COMPLETE THE LAB USING MY CODE AS A HEADSTART ECET 344 LAB Step 3. Then work out the mean of those squared differences. To work

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
COMPLETE THE LAB USING MY CODE AS A HEADSTART
ECET 344 LAB Step 3. Then work out the mean of those squared differences. To work out the mean, add up all the values then divide by how many. First add up all the values from the previous step. We want to add up all the values from 1 to N, where N=6 in our case because there are 6 values: Example (continued): Which means: Sum all values from (X1 47.5)2 to (XN47.5)2 We already calculated (X147.5)2=6.25 etc. in the previous step, so just sum them up: =6.25+56.25+6.25+156.25+ 56.25+156.25=437.5 we need to divide by how many, which is simply done by multiplying by "1/N": Example (continued): Mean of squared differences (POPULATION VARIANCE )=(1/6)437.5=72.916 (Note: this value is called the "Variance") Step 4. Take the square root of that to find the STANDARD DEVIATION: =V(72.91666667)=8.539 Lab Assignment: i Use random number generator to populate the (100 numbers). 2 Make the randos numbers value between [0.50]. i Data collected using the random number generator should tollow nornal distribution (bel1 curve) a. 027 of students score between [0006] points (1.e., 02 studente) b. 14 t of students score between [0T - 12] points (1.e., 14 students) c. 344 of students score between [1324] pothts (1.e., 34 students) d. 34 of atudents score between [25 - 36] points (1.e., 34 students) e. 145 of students score between [3744] points (1.0.,14 students) f. 028 of students score between {4550] points (1.e., 02 student 8 ) store the grades in an ID array. 2rite a complete ci+ program \{using data generated) to calculate: a. The mean. b. Population vartance. e. Standard Deviation.- Output the: - Data generated 50,55,45,60,40,35 Total Numbers 6 Mean 47,5 Population Variance 72.916 standard Deviation B. 539 3integ: The sgrt Eunction is located in the cmath library (Hinelude> ). Use casting where necessary. - Hintar Utilize do... While, while loop or for loops in conjunetion with arrays. 9. Increase your program modularity by implementing functions so the main contains declarations and function ealls. \#include \#include \#include \#include using namespace std; void filler(int list [100]); void display(int list [100] ); void mean1(int list[100], float\& mean); float mean 2 (int list [100]); int main() f int list [100]; float mean =0.0; filler(list); display(list); mean1(list, mean); mean = mean 2( list ); return 0; \} void filler(int list [100]) f srand(time(NULL)); for (int i=0;i=0&&i=28&i=16&&i=5088i=8488i=98&&i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions