0

I have a Normal distribution CCDF plot made in R. I need to apply Markov inequality to this data and plot them at this same plot. How can I implement it? Any help is welcome.

My data and what I have:

n01 <- rnorm(1000, mean = 27947623, sd = 575.839)
ecdf_n01 <- ecdf(n01)
ccdf <- data.frame(x = sort(n01),
                 y = 1-ecdf_n01(sort(n01)))
plot(ccdf)

The Markov inequality formula:

𝑃[𝑋≥𝑘]≤𝐸[𝑋]/𝑘

1 Answer 1

0

After the plot you've already drawn, add this code:

x <- sort(n01)
y <- mean(n01)/x
lines(x, y)

It's a very boring plot: over the range of n01, 1/x hardly changes at all:

It's a little more interesting if you change the range, but now the ECDF is crammed into a nearly vertical line:

x <- seq(2.6e7, 4e7, len=200)

plot(ccdf, xlim = range(x))

y <- mean(n01)/x
lines(x, y)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.