Share your knowledge with other learners . . . Login Register

Python statistics pvariance Method

📔 : Python Statistics 🔗

python में statistics module का pvariance() method का use population variance calculate करने के लिए किया जाता है।

What is Variance?

variance , variability का एक measure है जिसे mean / average से squared deviations का average लेकर calculate किया जाता है।

Variability ?

Variability बताती है कि किसी data set में data points आपस में और center of a distribution से कितने दूर हैं।

Population variance (σ2) हमें बताता है कि किसी specific population में data points कैसे फैले हुए हैं। यह population में प्रत्येक data point से mean ,square तक की दूरी का average है।

Population Variance Formula

σ2 = Σ(x-x¯)2/n

>

Python statistics pvariance() Method Syntax

statistics.pvariance(data)
Parameters
  1. data | required : data जिसका हमें population Variance calculate करना है , आप इसमें values की (list, tuple) pass कर सकते हैं।

  2. Return value : pass की गयी values के according value (Integer/float) return होती है।

Python statistics pvariance() Method Example

Copy Fullscreen Close Fullscreen Run
# Import statistics Library.
import statistics
#using list.
print(statistics.pvariance([23,34,56,657,56]))
#using tuple.
print(statistics.pvariance((23,34,56,657,56)))
Output
C:\Users\Rahulkumar\Desktop\python>python test_pvariance.py
60630.16
60630.16

Related Topics :

Rahul Kumar

Rahul Kumar

Hi ! My name is Rahul Kumar Rajput. I'm a back end web developer and founder of learnhindituts.com. I live in Uttar Pradesh (UP), India and I love to talk about programming as well as writing technical tutorials and tips that can help to others.

Get connected with me. :) LinkedIn Twitter Instagram Facebook

b2eprogrammers