Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please do in python. make as basic as possible. Exercise 1: Standard deviation Open the file lab.sy. This file has 3 numbers per-line, separated by

please do in python. make as basic as possible.
image text in transcribed
image text in transcribed
image text in transcribed
Exercise 1: Standard deviation Open the file lab.sy. This file has 3 numbers per-line, separated by commas. Calculate the mean and standard deviation of each column of the file using the formula: (2-2) is an element of the dataset at spoti. Where is standard deviation, is the mean of the dataset, N is the number of elements in the dataset, and You will need to: 1. Open the file 2. Initialize 3 list accumulators 3. Iterate over the lines of the file in a for loop and accumulate the values in the columns. 4. Compute the average (either do this inside the loop with a running sum or use the sun function on your lists). Once you have the mean I calculate the standard deviation using a second for loop Your output should look like: The mean of column 1 is 50.30, and the standard deviation is 28.81 The mean of column 2 is 499.29, and the standard deviation is 290.16 The mean of column 3 is 5011.12, and the standard deviation is 2874.15 Exercise 2: Standard deviations from the mean Add to your program from the previous part to ask for numerical input from the user. Find how many standard deviations from the mean the input is. The formula for deviations from the mean is: deviations FromMean Where is the standard deviation, is the mean of the dataset, and is the data the user provided. Give me a number : > 50 This number is 2000.0104 standard deviations from the mean for column 1. This number is 2001.5501 standard deviations from the mean for column 2. This number is 8001.7261 standard deviations from the mean for column 3. Spyder (Python 3.7) File Edit Search Source Run Help Debug Consoles Projects Tools View CODE @ ENCEEX Editor - C:\ProgramData\ASUS ASUS Live Update\Temp\Comp 1012Vab4.csv labi.csv lab4.py Activity 4.py TySalafiwchuk 1Q1.py 3 15.137276539895344,467.8005851796918,4343.680072959736 2 18.244056667113828,833.6931730213039,9843.994018402705 Tele 36.791419247841213,749.5023023722591,8072.935965209378 461.18695883881233, 327.14155154971013,6491.083388951113 548.158784329193175,929.6865515323357,688.4919642050791 60.11386250371532292,112.95626880727471,8866.004052200622 7 79.68809175761554, 15.388594018311942, 3055.4888377379652 8 39.77277683894941, 407.56365176512855,4728.463970615841 Poke 973.09602238255898, 263.74342922279135,2119.554144704071 10 29.77807573848895, 2.8550679049110794,3482.3355405811394 11 75.13624566292081,429.14791515621675,2887.858615650977 12 58.87938229767821,281.58589894804453,7251.406499621017 13 94.28116915734317,66.12117903472591,6968.561791346399 14 64.12951184148456,722.685574737945,8606.638164864036 15 46.46320330437038, 104.73110117177865,2117.9355687814073 16 68.79380279240537,599.4001152912929,5068.340686816881 17 19.377783867887675,933.0376354204046, 4532.34639304794 18 76.15149154685759,966.4518076469666,4625.546256691584 19 55.86616726178293,716.5978991777614,2769.361106829735 20 93.76418556314142,271.48638829170613,8577.722987140796 21 53.42297427541486,913.8717258327845, 7640.67014523373 22 72.55093377778655,709.170738905326, 1670.760910338057 23 57.99099139905407,598. 1495323394432,6178.234491204625 2478.16159915374796,659.8686147194219,7239.446937391945 25 40.37420226811073,459.98230758921744,2601.6883452294237 26 67.26994188779022,839.140268848306, 1600.4687495601277 27 97.63848801526538,737.0018265384884,4151.902013722292 28 70.72406524984339,707.2490805348754,9578.985235768401 29 65.79134142635397, 716.1158885535542,874.2696779434943 38 92.38796987872207,589.3957697210021, 3872.931738994678 31 58.71324454621095,734.9800813685623, 1157.90248835546 32 56.63662694893629,805.5854491188966,5166.0385483724 33 4.635567279141972,459.7685454434324,8330.157852604916 3442.37570611577317,926.9854455394217, 2011.295842671987 35 99.52554972625816,271.8027468730178,8522.088809089837 36 89.26163562031036,675.549131252173,5015.027693733767 3752.20382418815689,942.6338542806204,560.7635738899319 38 30.90031969635316,539.600089495089,2582.4675611940074 39 60.45465735746786,275.8195689827679,8471.817386040333 40 45.61239842461575,211.85812171177997,6089.981432074166 41 31.692698559249026,291.41797080321754,2782.539701584763 42 36.73462128146131,627.9869920174547,5543.948671295311 51.17813464671854.529.8845496090557.5360.827267910563 Type here to search . to e

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

Identify the nine clusters in the analytics ecosystem.

Answered: 1 week ago