Home > Enterprise >  Why isn't the highest probability 1 for a cumulative distribution function when applied to a no
Why isn't the highest probability 1 for a cumulative distribution function when applied to a no

Time:11-04

I'm starting to learn about cdfs and am experimenting with this sample code:

xs = np.linspace(-3,3)
ys = norm(0,1).cdf(XS)

While xs gives me 50 values between -3 and 3, the highest value is 3. In turn, ys gives a set of 50 incremental probabilities between 0 and 1, seemingly representing the probability of getting the value at or below each xs value. It's curious to me though that the top value of ys is 0.9986501, instead of 1. It would seem to me that you would always get a value of 3 or less. So why is the highest value (marginally) less than 1?

CodePudding user response:

The unit normal distribution is defined on the entirety of the real line. Just because your array has values less than or equal to 3, does not mean that a value sampled from that distribution cannot be more than 3 (albeit with a very low probability).

  • Related