Site icon codemaniacstudio

What is Central Tendency measures? Describe mean, median, mode, variance, Standard Deviation.

What is Central Tendency measures? Describe mean, median, mode, variance, Standard Deviation.

SOLUTION....

1. Mean

  • Definition: The arithmetic average of all values in a dataset.

  • Python Example:

import statistics

data = [10, 15, 20, 20, 25, 30, 35]
mean_value = statistics.mean(data)
print("Mean:", mean_value)  # Output: 22.142857142857142

2. Median

  • Definition: The middle value when the data is arranged in ascending order.

  • Python Example:

median_value = statistics.median(data)
print("Median:", median_value)  # Output: 20

3. Mode

  • Definition: The value that occurs most frequently in a dataset.

  • Python Example:

mode_value = statistics.mode(data)
print("Mode:", mode_value)  # Output: 20

4. Variance

  • Definition: Measures how far the values are spread out from the mean.

  • Python Example:

variance_value = statistics.variance(data)
print("Variance:", variance_value)  # Output: 84.57142857142857

5. Standard Deviation

  • Definition: The square root of variance; indicates the average distance of each value from the mean.

  • Python Example:

std_dev = statistics.stdev(data)
print("Standard Deviation:", std_dev)  # Output: 9.196
Exit mobile version