"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > REAL WORLD APPLICATION: Statistics for Data Science

REAL WORLD APPLICATION: Statistics for Data Science

Published on 2024-08-22
Browse:989

REAL WORLD APPLICATION: Statistics for Data Science

This is a pretty simple calculator. mu here is the mean of the random variable and sigma is one standard deviation from the mean. You're on the job doing what people do and you have to calculate the probability of a successes around the mean and within a parameter that we define here as lower_bound and upper_bound.

This code in Python.

Made simple so you know what you're dealing with.

The result should be:
The percentage of scores between 808 and 1450 is approximately 88.14%.


# Set the parameters
mu = 1359
sigma = 77
lower_bound = 808
upper_bound = 1450

# Calculate the z-scores for the lower and upper bounds
z_lower = (lower_bound - mu) / sigma
z_upper = (upper_bound - mu) / sigma

# Calculate the probabilities using the cumulative distribution function (CDF)
prob_lower = norm.cdf(z_lower)
prob_upper = norm.cdf(z_upper)

# Calculate the percentage between the bounds
percentage = (prob_upper - prob_lower) * 100

print(f"The percentage of scores between {lower_bound} and {upper_bound} is approximately {percentage:.2f}%.")

Release Statement This article is reproduced at: https://dev.to/anna_lapushner/real-world-application-statistics-for-data-science-1086?1 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3