Question: Python Programming Mean and standard deviation. You are given a csv file that has 3 numbers per line, separated by commas. Write a program to

Python Programming

Mean and standard deviation.

You are given a csv file that has 3 numbers per line, separated by commas. Write a program to calculate the mean and standard deviation of each column of the file, using the formula:

Python Programming Mean and standard deviation. You are given a csv file where sigma is the standard deviation, xbar is the mean of the data set, N is the number of elements in the dataset, and xi is an element of the dataset at spot i.

You will need:

a. open the file.

b. initialize 3 list accumulators

c. iterate over the lines of the file in a for loop and accumulate the values in the columns

d. compute the aerage

e. when you have the mean xbar, calculate the standard deviation using a second for loop.

The output should look like:

The mean of column 1 is ____ and the standard deviation is ____

The mean of column 2 is ____, and the standard deviation is ____

The mean of column 3 is ____, and the standard deviation is____

(Obviously no numbers have been calculated, but when they are they should appear in the output. I have the csv file and cannot upload it, so the context of the code should call on an arbitrary csv file, and my code will call on mine.

= .,(2, - ) 2) -1

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!