print("hello world")
for i in range(100):
print(i)
- hello
- hi
This document explains how to calculate the Arithmetic Mean (AM) for grouped frequency data.
Where:
- AM = Arithmetic Mean
- fᵢ = Frequency of the i-th class
- xᵢ = Mid-point (class mark) of the i-th class
- N = Total frequency (i.e., Σfᵢ)
| Class Interval | Frequency (fᵢ) | Mid-point (xᵢ) | fᵢ × xᵢ |
|---|---|---|---|
| 10 – 20 | 3 | 15 | 45 |
| 20 – 30 | 5 | 25 | 125 |
| 30 – 40 | 2 | 35 | 70 |
| Total | 10 | 240 |
Calculation:
AM = 240 / 10 = 24
The Geometric Mean (GM) is a measure of central tendency used when the data involves products or ratios, such as rates, percentages, growth factors, or logarithmic data.
The Geometric Mean of a set of n positive numbers is the nth root of their product:
GM = (x₁ × x₂ × x₃ × ... × xₙ)^(1/n)
Or more compactly:
GM = (∏ xᵢ)^(1/n)
Given values: x₁, x₂, ..., xₙ
-
Multiply all the values together:
P = x₁ × x₂ × ... × xₙ -
Take the nth root of the product:
GM = P^(1/n)
-
Take the logarithm of each value:
log(GM) = (1/n) × [log(x₁) + log(x₂) + ... + log(xₙ)] -
Take the antilog to get GM:
GM = antilog { (1/n) × Σ log(xᵢ) }
Given data: 4, 16, 64
Step 1: Multiply all the values:
4 × 16 × 64 = 4096
Step 2: Take the cube root (since n = 3):
GM = ³√4096 = 16
- Rates of change (e.g., growth rates, returns on investment)
- Percentages or indices
- Skewed distributions
- To avoid the influence of extreme values
Feel free to contribute examples or improvements via pull request.