正态分布PDF,CDF,PPF有关正态分布产生,及其P值和Z值计算,及如何确定正态分布的sigma值,使其满足以下情形:正态分布一个区间x在[0,1]内,均值为0.5,端点坐标为(0,0),(1,0)

问题1:标准正态分布(根据z值求p值),z值代表面积,p值代表概率;
用U表示标准正态分布,临界值Zα满足P(U>Zα)=Zα,即P(U≤Zα)=1-α。当α=0.025时,就是查表中0.975对应的值,0.975在表中1.9那一行,0.06那一列,所以Z0.025=1.96。

>>> import scipy.stats as st
>>> st.norm.ppf(.95)
1.6448536269514722
>>> st.norm.cdf(1.64)
0.94949741652589625

Diagram 1

st.norm.ppf(.975)
1.959963984540054
>>>st.norm.ppf(.025)
-1.960063984540054

Diagram 2

(2)基础知识补充:正态分布PDF,CDF,PPF基本概念
PDF
Probability distributions are typically defined in terms of the probability density function. However, there are a number of probability functions used in applications.
Probability Density Function For a continuous function, the probability density function (pdf) is the probability that the variate has the value x. Since for continuous distributions the probability at a single point is zero, this is often expressed in terms of an integral between two points.

For a discrete distribution, the pdf is the probability that the variate takes the value x.

The following is the plot of the normal probability density function.

plot of the normal probability density function
PDF schematic
CDF
Cumulative Distribution Function The cumulative distribution function (cdf) is the probability that the variable takes a value less than or equal to x. That is
For a continuous distribution, this can be expressed mathematically as
For a discrete distribution, the cdf can be expressed as
The following is the plot of the normal cumulative distribution function.
plot of normal cumulative distribution function
The horizontal axis is the allowable domain for the given probability function. Since the vertical axis is a probability, it must fall between zero and one. It increases from zero to one as we go from left to right on the horizontal axis.
CDF schematic

PPF
Percent Point Function The percent point function (ppf) is the inverse of the cumulative distribution function. For this reason, the percent point function is also commonly referred to as the inverse distribution function. That is, for a distribution function we calculate the probability that the variable is less than or equal to x for a given x. For the percent point function, we start with the probability and compute the corresponding x for the cumulative distribution. Mathematically, this can be expressed as
or alternatively
The following is the plot of the normal percent point function.
plot of the normal percent point function
Since the horizontal axis is a probability, it goes from zero to one. The vertical axis goes from the smallest to the largest value of the cumulative distribution function.
Schematic diagram of PPF
参考网址:PDF,CDF,PPF

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324786576&siteId=291194637