Saturday, 5 February 2022

Python statistics module




#!/usr/bin/env python
# coding: utf-8

# In[ ]:


import statistics as s


# In[3]:


s.mean(range(3))    
#(0+1+2)/3    


# In[7]:


s.median(range(4))
#clcoding.com


# In[8]:


s.median_low(range(4))


# In[9]:


s.median_high(range(4))


# In[10]:


s.median_grouped(range(4))


# In[12]:


s.mode(list(range(4))+[2])


# In[14]:


s.pstdev(list(range(4))+[2])


# In[15]:


s.stdev(list(range(4))+[2])


# In[16]:


s.pvariance(list(range(4))+[2])


# In[17]:


s.variance(list(range(4))+[2])


# In[ ]:




0 Comments:

Post a Comment

Codecademy Code Foundations

Popular Posts

Categories

Android (23) AngularJS (1) Assembly Language (2) Books (10) C (75) C# (12) C++ (81) Course (1) Data Strucures (4) Downloads (1) Engineering (13) flutter (1) FPL (17) Hadoop (1) HTML&CSS (38) IS (25) Java (89) Leet Code (4) Pandas (1) PHP (20) Projects (17) Python (319) R (69) Selenium Webdriver (2) Software (14) SQL (27)