May 2018
Beginner
490 pages
13h 16m
English
Step 1: Calculate the mean of the array data1.
You can check this with the math.py, as shown in the following function:
data1 = [1, 2, 3, 4]M1=statistics.mean(data1)print("Mean data1",M1)
The answer is 2.5. The mean is not the median (the middle value of an array).
Step 2: Calculate the mean of array data2.
The mean calculation is done with the following standard function:
data2 = [1, 2, 3, 5]M2=statistics.mean(data2)print("Mean data2",M2)
The answer is:

The bar above the X signifies that it is a mean.
Step 3: Calculate the variance using the following equation:
Now NumPy will calculate the variance with the absolute value of each ...
Read now
Unlock full access