#154easyStatistics
Z-Score Percentile
Time Limit: 2sMemory: 256MB
Problem
Given a normal distribution with mean mu and standard deviation sigma, compute the probability .
This is equivalent to evaluating the cumulative distribution function (CDF) of the normal distribution at the point x.
Input Format
Three space-separated floating-point numbers: mu, sigma, and x.
Output Format
A single floating-point number to 6 decimal places representing .
Examples
Example 1
Input(Three space-separated floating-point numbers: mu, sigma, and x.)
0 1 0
Output
0.500000
For standard normal, P(X <= 0) = 0.5 by symmetry.
Example 2
Input(Three space-separated floating-point numbers: mu, sigma, and x.)
100 15 130
Output
0.977250
z = (130-100)/15 = 2.0, P(X <= 130) = Phi(2.0) = 0.977250.
Constraints
- •-1000 <= mu <= 1000
- •0.001 <= sigma <= 1000
- •-10000 <= x <= 10000
Loading interactive editor…