STATISTICAL FUNCTIONS (MEAN,MEDIAN,VARIANCE,STANDARD DEVIATION) IN NUMPY – PYTHON PROGRAMMING
[ad_1]
STATISTICAL FUNCTIONS
1. MIN
2. MAX
3. MEAN
4. MEDIAN
5. AVERAGE
6. VARIANCE
7. STANDARD DEVIATION
Source
[ad_2]
[ad_1]
STATISTICAL FUNCTIONS
1. MIN
2. MAX
3. MEAN
4. MEDIAN
5. AVERAGE
6. VARIANCE
7. STANDARD DEVIATION
Source
[ad_2]
Hi, for any given array, any dimesion, Could I use this code to create a generic statistical function in python to calc mean, interquartile, variance, median?
import numpy as np
from scipy import stats
import statistics
def stats_values(arr):
x = round(statistics.mean(arr),2)
x1 = round(statistics.median(arr),2)
x2 = round(statistics.stdev(arr),2)
x3 = round(statistics.variance(arr),2)
x4 = round(statistics.mode(arr),2)
q3, q1 = np.percentile(arr, [75 ,25])
iqr = round(q3 – q1,2)
print(x)
print(x1)
print(x2)
print(x3)
print(x4)
print(iqr)
if _name_ == "__main__":
array_num=[]
n=int(input())
for i in range(n):
a=input()
af=float(a)
array_num.append(af)
arr=np.array(array_num)
stats_values(arr)
Hi sir. Thanks for your all lectures. Please do share the lectures on SQL.
Sir maths important questions for degree 3rd semester
Sir please make some videos related placement preparation! Or please launch some course! Related that
Sir pandas
Sir plzz upload interview questions for Python on 3 years of experience plzz consider my comment
Thank you very much sir.
Sir,does these video's comes under scipy?
Sir Please add Data Structure in Python
Thankyou sir very inspiring video
You are my rolemodel
Sir please don't stop making videos sir I'll download all of your videos and watching repeatedly for getting grip on my subject so many members are depends on you sir 🙏🏻🙏🏻🙏🏻🙏🏻