Data mining

Durga-prasad_01

A. Write a Python program that computes the factorial of an integer X (the program should ask the user to enter the value of X) 

B. Write a Python program to compute the CORRELATION according to the following Pearson equation: 

Hint: define a function called cor using the def key word that takes two inputs and return the correlation as an output.

Then create two vectors X and Y (Lists) of 10 numbers each and calculate the correlation between them using the function cor you defined.

For more details about the correlation, see the following link:

https://www.statisticshowto.datasciencecentral.com/probability-and-statistics/correlation-coefficient-formula/#Pearson

    • 7 years ago
    • 10
    Answer(0)