DEV Community

anna lapushner
anna lapushner

Posted on

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

The Z-score formula is:

Z = (X - μ) / σ

Where:

Z is the Z-score

X is the individual data point

μ is the population mean

σ is the population standard deviation

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)

`

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

While many AI coding tools operate as simple command-response systems, Qodo Gen 1.0 represents the next generation: autonomous, multi-step problem-solving agents that work alongside you.

Read full post →

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post →