Reputation: 3828
For the following example how do I compute the percentile / probability values / tail area in julia
Example : N(1100, 200) #Normally distributed with mean 1100 & standard deviation 200 for lets say SAT score
x = 1030 #Lets say students SAT score
#manual calculation
z-score = (x-mean)/std.dev = 1030-1100 / 200 = -0.35
#using the probability table the tail area corresponding to this is 0.3632
The zscore can be computed using the stats base package.
using StatsBase
zscore([1030], 1100, 200)
# Out > 0.35
How do i compute the corresponding probability (0.3632) obtained from the statistical tables?
Upvotes: 3
Views: 472
Reputation: 7674
Turning @DNF's comment into an answer:
You can use the cdf
function from Distributions.jl:
julia> using Distributions
julia> cdf(Normal(1100, 200), 1030)
0.3631693488243809
Upvotes: 2