import numpy as np

# Your list of weights
weights = [
0.87, 0.91, 0.89, 0.83, 0.91, 0.88, 0.9, 0.88, 0.88, 0.94, 0.91, 0.91, 0.88,
0.88, 0.92, 0.82, 0.86, 0.87, 0.86, 0.89, 0.84, 0.85, 0.9, 0.86, 0.87, 0.93,
0.89, 0.79, 0.93, 0.84, 0.9, 0.86, 0.93, 0.91, 0.87, 0.82, 0.81, 0.84, 0.84,
0.88, 0.88, 0.85, 0.84, 0.83, 0.9, 0.86, 0.84, 0.87
]

# Calculate the sample standard deviation
mean_weight = np.mean(weights)
deviations = [weight - mean_weight for weight in weights]
squared_deviations = [dev ** 2 for dev in deviations]
variance = sum(squared_deviations) / (len(weights) - 1)
std_deviation = np.sqrt(variance)

print("The sample standard deviation is:", std_deviation)

Q&A Education