ZED-Score Calculator

`# import the important packages
import pandas as pd # library used for data manipulation and analysis
import numpy as np # library used for working with arrays
import matplotlib.pyplot as plt # library for plots and visualizations
import seaborn as sns # library for visualizations
%matplotlib inline

import scipy.stats as stats # this library contains a large number of probability distributions as well as a growing library of statistical functions
# ZED score comparison

x_1 = 83000
mu_1 = 77000
sigma_1 = 1100

z_1 = (x_1 – mu_1) / sigma_1
print(“The Z-score is:”, z_1)

x_2 = 92000
mu_2 = 59000
sigma_2 = 1300

z_2 = (x_2 – mu_2) / sigma_2
print(“The Z-score is:”, z_2)

Formula_A = stats.norm.cdf(z_1) – stats.norm.cdf(z_2)
print (Formula_A)

Formula_B = stats.norm.cdf(x_1,loc=mu_1,scale=sigma_1) – stats.norm.cdf(x_2,loc=mu_2,scale=sigma_2)
print (Formula_B)

`


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
Free & easy ad network.