全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
12285 7
2014-08-06
RT,得到的累积分布函数后,怎样求的在给定概率值下的随机变量值
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-8-6 13:37:40
以正态分布为例:

dnorm(x, mean = 0, sd = 1, log = FALSE)
pnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)
qnorm(p, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)
rnorm(n, mean = 0, sd = 1)

dnorm gives the density;
pnorm gives the distribution function;
qnorm gives the quantile function;
rnorm generates random deviates。

不知道楼主说的是不是这样,给定\[  F(x)=\int_{- \infty}^x f(t) dt  \]中的\[  F(x)  \]值,想求出\[f(x)\]值。那么,应当用dnorm。

例如,已知\[X \sim N(0, 1)\],且\[F(x)=0.5=\int_{- \infty}^x f(t) dt \],求\[f(x)\]的值。

此时输入
复制代码

即可,答案为 0.3989423。

我不知道有没有更简单的方法。

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-8-6 14:39:51
xkdog 发表于 2014-8-6 13:37
以正态分布为例:

dnorm(x, mean = 0, sd = 1, log = FALSE)
非常感谢您的回答,收益颇丰。
假如这里是一个一般的分布或未知分布这个问题要怎么解决呢?

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-8-6 15:33:42
ttshark 发表于 2014-8-6 14:39
非常感谢您的回答,收益颇丰。
假如这里是一个一般的分布或未知分布这个问题要怎么解决呢?
其他分布的用法与normal distribution类似,你只要知道分布的名称就行了。直接help(distribution)能够给你相关结果。

The functions for the density/mass function, cumulative distribution function, quantile function and random variate generation are named in the form dxxx, pxxx, qxxx and rxxx respectively.

For the beta distribution see dbeta.

For the binomial (including Bernoulli) distribution see dbinom.

For the Cauchy distribution see dcauchy.

For the chi-squared distribution see dchisq.

For the exponential distribution see dexp.

For the F distribution see df.

For the gamma distribution see dgamma.

For the geometric distribution see dgeom. (This is also a special case of the negative binomial.)

For the hypergeometric distribution see dhyper.

For the log-normal distribution see dlnorm.

For the multinomial distribution see dmultinom.

For the negative binomial distribution see dnbinom.

For the normal distribution see dnorm.

For the Poisson distribution see dpois.

For the Student's t distribution see dt.

For the uniform distribution see dunif.

For the Weibull distribution see dweibull.

For less common distributions of test statistics see pbirthday, dsignrank, ptukey and dwilcox (and see the ‘See Also’ section of cor.test).

未知分布?分布都未知,如何求逆累计分布?这个不知道。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-8-6 16:48:01
xkdog 发表于 2014-8-6 15:33
其他分布的用法与normal distribution类似,你只要知道分布的名称就行了。直接help(distribution)能够给你 ...
感谢您回答的这么详细,可能是我瞎想了吧。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-10-26 16:31:45
xkdog 发表于 2014-8-6 15:33
其他分布的用法与normal distribution类似,你只要知道分布的名称就行了。直接help(distribution)能够给你 ...
你好,我想咨询你一个问题,我现在有一个分布是扩展的weibull分布,就是分布函数跟密度函数都跟weibull分布不一样,但是知道分布函数,请问怎么求得这个扩展weibull分布的逆累计分布函数?我的问题跟他差不多,得出逆累计分布后,根据给定的概率值求随机变量值。
为这个问题我头疼了好几天天了,这里过不去就没法往下做了,希望你能帮我一下。谢谢~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群