Python Statistics Module

Published: 19 May 2020
on channel: Parag Dhawan
432
9

Goal : Learn python by Implementation.
Objective :
To compute and understand
1. mean
2. median
3. mode
4. variance
5. standard deviation

Code:-
Statistics

To understand data statistics play a very important role.
it helps in collecting, organizing, analyzing, and interpreting data.
Data Analyst(descriptive and inferential statistics )

Descriptive Statistics - help to summarize or describe data.
identify important elements in datasets.

Inferential Statistics - Explains data elements via the relationship with other data elements.
explains what we found.

Measure of Central Tendency

Measure of Central Tendency,
Measure of dispersion

import statistics as s

dir(s)

Mean

from statistics import *

wt = [60,65,68,70,75]

mean(wt)

mean([])

from fractions import Fraction as F
mean([F(3, 7), F(1, 21), F(5, 3), F(1, 3)])

from decimal import Decimal as D
mean([D("0.5"), D("0.75"), D("0.625"), D("0.375")])

Suppose an investor purchases an equal value of shares in each of three companies, with P/E (price/earnings) ratios of 2.5, 3, and 10.
What is the average P/E ratio for the investor's portfolio?

harmonic_mean([2.5, 3, 10])

mean([2.5, 3, 10])

wt = [60,65,68,70,75,60,1000]

mean(wt)

harmonic_mean(wt)

Median

wt = [60,65,68,70,75,60,1000,80]

sorted(wt)

median_high(wt)

Mode

wt = [65,68,70,75,60,1000,80,60,60]

mode(wt)

Measure of dispersion

Variance

wt = [60,65,68,70,75]

mean(wt)

variance(wt)

Standard Deviation

stdev(wt)

pvariance(wt)

pstdev(wt)

dir ()

help(mean)

============================================================================= Link for Tutorial Series

Jupyter Notebook Tutorial Series:-
   • How To Open Jupyter Notebook in Windows  
Python Tutorial Series:-
   • Introduction to Python | Python Applications  
Python Assignments and Objective Questions:-
   • Objective Questions Python - 1  
Tech. Videos By Parag Dhawan    • Template Matching Using OpenCV (Python) | ...  
============================================================================= Feel free to connect and ask your queries:-

Linkedin:-   / parag-dhawan  
Youtube:-    / paragdhawan  
Facebook Page:- http://fb.me/dhawanparag
Instagram: -   / paragdhawan  
Twitter:-   / dhawan_parag  
GitHub:- https://github.com/paragdhawan/
Facebook Profile:- https://www.facebook.com/profile.php?...
============================================================================= Show your support by Subscribing to the channel:-
https://www.youtube.com/c/ParagDhawan... ============================================================================= Link of Next video:-    • Python Random Module  
=============================================================================
#ParagDhawan
#PythonCrashCourse
#Python
#PythonTutorialForBeginners
#PythonForDataScience
#PythonProgramming
#PythonProgrammingLanguage
#PythonTutorial
#PythonCode
#Python3

=============================================================================
Note: Watch the video at a speed of 1.5


On this page of the site you can watch the video online Python Statistics Module with a duration of hours minute second in good quality, which was uploaded by the user Parag Dhawan 19 May 2020, share the link with friends and acquaintances, this video has already been watched 432 times on youtube and it was liked by 9 viewers. Enjoy your viewing!