」工欲善其事,必先利其器。「—孔子《論語.錄靈公》
首頁 > 程式設計 > 現實世界的應用:數據科學統計

現實世界的應用:數據科學統計

發佈於2024-08-22
瀏覽:195

REAL WORLD APPLICATION: Statistics for Data Science

這是一個非常簡單的計算器。這裡 mu 是隨機變數的平均值,sigma 是平均值的一個標準差。您在工作中所做的事情與人們所做的一樣,並且您必須計算圍繞均值並在我們在此定義為下限和上限的參數內成功的機率。

這段Python程式碼。

變得簡單,這樣您就知道自己在處理什麼。

結果應該是:
808到1450之間的分數百分比約為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}%.")

版本聲明 本文轉載於:https://dev.to/anna_lapushner/real-world-application-statistics-for-data-science-1086?1如有侵犯,請聯絡[email protected]刪除
最新教學 更多>

免責聲明: 提供的所有資源部分來自互聯網,如果有侵犯您的版權或其他權益,請說明詳細緣由並提供版權或權益證明然後發到郵箱:[email protected] 我們會在第一時間內為您處理。

Copyright© 2022 湘ICP备2022001581号-3