# Geometric and Harmonic Means in Python

The most commonly known and used statistical mean is the arithmetic mean, calculated by adding all values and dividing the result by the number of values. The arithmetic mean is one of a "family" of three means called the Pythagorean means, the other two being the geometric mean and the harmonic mean. In this post I will explain when you might need to use these alternatives and then show how to calculate them using Python.

# Benford’s Law in Python

In this post I will write a Python implementation of Benford's Law which describes the distribution of the first digits of most sets of numeric data.

I recently posted an article on Zipf's Law and the application of the Zipfian Distribution to word frequencies in a piece of text. Benford's Law can be considered a special case of Zipfian Law.

# Zipf’s Law in Python

In this post I will write a project in Python to apply Zipf's Law to analysing word frequencies in a piece of text.

Zipf's Law describes a probability distribution where each frequency is the reciprocal of its rank multiplied by the highest frequency. Therefore the second highest frequency is the highest multiplied by 1/2, the third highest is the highest multiplied by 1/3 and so on.

This is best illustrated with a graph.

# Estimating Pi in Python

In this project I will code in Python a few of the methods of estimating Pi.

Pi is an irrational number starting off 3.14159 and then carrying on for an infinite number of digits with no pattern which anybody has ever discovered. Therefore it cannot be calculated as such, just estimated to (in principle) any number of digits.