How to Calculate Mean in Python


The ‘Mean’ is arithmetic average. It is expressed as X̄. In order to calculate the mean at least two numbers are needed.

For Example: we have following number set: 5, 6, 8 ,11, 15, 18, 25, 36.

The Mean is calculated as:

X̄= ∑X / N
i.e. Adding up the scores and dividing the total by the number of scores
Where N is 8.
X̄ = 5 + 6+ 8+ 11+ 15 + 18+ 25 +36 / 8
X̄ = 124 / 8
X̄= 15.5

How to Calculate Mean in Python

Python is Popular language for doing data analysis. It provide statistics module, which has very useful function like mean ( ). It is used to calculate mean of a given list of numbers. If you are using any version of Python3.


Leave a Reply

Your email address will not be published. Required fields are marked *