python में statistics module का stdev() method का use sample standard deviation calculate करने के लिए किया जाता है।

What is Sample Standard Deviation?

Sample Standard deviation का use statistics में dispersement को measure करने के लिए किया जाता है , मतलब कि आपका data , mean / average के आसपास कितना फैला हुआ है। या कह सकते हैं कि data value , data mean / average के कितने close है।


यह Population Standard Deviation से मिलता झुलता ही है बस अंतर इतना है कि Population Standard Deviation , Population Variance का square root होता है तो Sample Standard Deviation, Sample Variance का square root होता है।

Sample Standard Deviation Formula

= Sample Variance

Sample Variance

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

Python statistics stdev() Method Syntax

statistics.stdev(data)
Parameters
  1. data | required : data जिसका हमें Sample Standard Deviation calculate करना है , आप इसमें values की (list, tuple) Or Iterator pass कर सकते हैं।

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

Python statistics stdev() Method Example

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

Related Topics :

Rahul Kumar

Rahul Kumar

Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)

Get connected with me. :) LinkedIn Twitter Instagram Facebook

b2eprogrammers