Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the missing functions myAverage, myStandardDev, myMin, and myCorrelation in the following code. The formulas for average (mean), standard deviation and correlation are given

 

Write the missing functions myAverage, myStandardDev, myMin, and myCorrelation in the following code. The formulas for average (mean), standard deviation and correlation are given below. X + x, + + x. mean deviation = n-1 (x, -xXy,- ) 1-1 import math import random def myAvearage(1st): def myStandardDev(1st): def myMin(1st): def myCorrelation(x, y): def main(): alist = (10, 20, 30, 5e, 80, 90, 100, 15, 125, 128, 150, 185, 200, 240, 260, 280] Blist = [13, 25, 28, 45, 79, 85, 111, 115, 125, 256, 16e, 195, 230, 270, 280, 320] clist - blist.copy() clist.reverse() dlist = [random.randint(1,99) for x in range(1len(alist))] print("Lists:") print("List A = " + str(alist)) print("ListB = " + str(blist)) print("List c = " + str(cList)) print("List D = " + str(dList)) print() print("List A Average = " + str(myAvearage(alist))) print("Standart Deviation of List A = " + str(myStandardDev(alist))) print("Minimum of List A = " + str(myMin(alist))) print() print("List B Average = " + str(myAvearage(alist))) print("Standart Deviation of List B = " + str(myStandardDev(alist))) print("Minimum of List B = " + str(myMin(alist))) print() print("Correlation of List A and B = " + str(myCorrelation(alist, blist))) print("Correlation of List A and C = " + str(myCorrelation(alist, CList))) print("Correlation of List A and D = " + str(myCorrelation(alist, dList))) main()

Step by Step Solution

3.45 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

import math Library for sqrt import math import random library for random number ge... 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

General Chemistry

Authors: Darrell Ebbing, Steven D. Gammon

9th edition

978-0618857487, 618857486, 143904399X , 978-1439043998

More Books

Students also viewed these Accounting questions