开发者

How to use ChebyShev's Inequality in R [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

开发者_如何学JAVA Improve this question

I have a statistical question in R and I was hoping to use Chebyshev inequality theorem, but I don't know how to implement it.

Example: Imagine a dataset with a nonnormal distribution, I need to be able to use Chebyshev's inequality theorem to assign NA values to any data point that falls within a certain lower bound of that distribution. For example, say the lower 5% of that distribution. This distribution is one-tailed with an absolute zero.

I am unfamiliar with how to go about this, as well as with what sort of example might help.

If it is helpful to know, this problem is stemming from a large amount of different datasets with all different types of distribution - all nonnormal. I need to be able to select a certain lower percentage of that distribution and assign NA values to them to discount them from the rest of the analysis. Will appreciate any help!

Thanks!


From the description "I need to be able to select a certain lower percentage of that distribution and assign NA values to them to discount them from the rest of the analysis," it sounds pretty simple:

x <- runif(1000) # Simulate some data
cutpt <- quantile(x,probs=.05)
x[x<cutpt] <- NA
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜