पायथन सांख्यिकी। pvariance () विधि
उदाहरण
संपूर्ण जनसंख्या के विचरण की गणना करें:
# Import statistics Library
import statistics
# Calculate
the variance of an entire population
print(statistics.pvariance([1, 3, 5, 7, 9, 11]))
print(statistics.pvariance([2,
2.5, 1.25, 3.1, 1.75, 2.8]))
print(statistics.pvariance([-11, 5.5, -3.4,
7.1]))
print(statistics.pvariance([1, 30, 50, 100]))
परिभाषा और उपयोग
यह statistics.pvariance()
विधि संपूर्ण जनसंख्या के प्रसरण की गणना करती है।
एक बड़ा विचरण इंगित करता है कि डेटा फैला हुआ है, - एक छोटा विचरण इंगित करता है कि डेटा माध्य के आसपास बारीकी से क्लस्टर किया गया है।
युक्ति: डेटा के नमूने से विचरण की गणना करने के लिए, statistics.variance()
विधि देखें।
वाक्य - विन्यास
statistics.pvariance(data, xbar)
पैरामीटर मान
Parameter | Description |
---|---|
data | Required. The data values to be used (can be any sequence, list or iterator) |
xbar | Optional. The mean of the given data (can also be a second moment around a point that is not the mean). If omitted (or set to None), the mean is automatically calculated |
नोट: यदि डेटा खाली है, तो यह एक सांख्यिकी त्रुटि देता है।
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | float दिए गए डेटा के जनसंख्या भिन्नता का प्रतिनिधित्व करने वाला एक मान |
---|---|
पायथन संस्करण: | 3.4 |