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]

Comment List

  • Sundeep Saradhi Kanthety
    December 25, 2020

    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)

  • Sundeep Saradhi Kanthety
    December 25, 2020

    Hi sir. Thanks for your all lectures. Please do share the lectures on SQL.

  • Sundeep Saradhi Kanthety
    December 25, 2020

    Sir maths important questions for degree 3rd semester

  • Sundeep Saradhi Kanthety
    December 25, 2020

    Sir please make some videos related placement preparation! Or please launch some course! Related that

  • Sundeep Saradhi Kanthety
    December 25, 2020

    Sir pandas

  • Sundeep Saradhi Kanthety
    December 25, 2020

    Sir plzz upload interview questions for Python on 3 years of experience plzz consider my comment

  • Sundeep Saradhi Kanthety
    December 25, 2020

    Thank you very much sir.

  • Sundeep Saradhi Kanthety
    December 25, 2020

    Sir,does these video's comes under scipy?

  • Sundeep Saradhi Kanthety
    December 25, 2020

    Sir Please add Data Structure in Python

  • Sundeep Saradhi Kanthety
    December 25, 2020

    Thankyou sir very inspiring video

  • Sundeep Saradhi Kanthety
    December 25, 2020

    You are my rolemodel

  • Sundeep Saradhi Kanthety
    December 25, 2020

    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 🙏🏻🙏🏻🙏🏻🙏🏻

Write a comment