Summarize small datasets and describe uncertainty using everyday examples. Optional support only—not a prerequisite for exams or certificates.
Understand why an unusually large value can change an average.
Use the range to describe how far apart the smallest and largest observations are.
Read values between zero and one without treating predictions as guarantees.
The mean is the sum divided by the number of observations. For 2, 4 and 6, the sum is 12 and the count is 3, giving a mean of 4. An empty dataset has no mean; never divide by a count of zero.
values = [2, 4, 6]
mean = sum(values) / len(values)
print(mean) # 4.0Sort the values and take the middle one. For an even count, average the two middle values. The median of 2, 4 and 30 is 4, while the mean is 12. The large observation pulls the mean up; it may be valid data or an error worth checking.
from statistics import mean, median
values = [2, 4, 30]
print(mean(values)) # 12
print(median(values)) # 4
print(median([2, 4, 6, 8])) # 5.0The range is the maximum minus the minimum. Datasets can have the same mean but very different spread. Standard deviation is a more detailed measure you will meet later; the range is enough for this first comparison.
steady = [4, 5, 6]
variable = [0, 5, 10]
print(max(steady) - min(steady)) # 2
print(max(variable) - min(variable)) # 10A probability of 0 means impossible under the stated model; 1 means certain under that model. If a bag contains 3 blue counters and 1 red counter, the chance of a blue counter on one random draw is 3/4 = 0.75. Drawing without replacement changes the next probability. Multiplying probabilities is valid for independent events, not all events.
blue = 3
red = 1
p_blue = blue / (blue + red)
print(p_blue) # 0.75AI scores need context: A model score of 0.75 is not automatically a reliable 75% chance. Calibration, representative data and evaluation matter.
times = [1, 2, 2, 3, 12] # Print mean, median, range and share at or below 3
Test your understanding with this quiz. Select the best answer for each question.
Help optimize our AI programming lessons to ensure student success!
Sign in to send a comment to Customer Support.