A undergraduate problem

Compute P(45 < X < 55) for X Binomial(100,0.5)

sum(dbinom(46:54, 100, 0.5))

Using "log = TRUE" for an extended range :

n <- 2000
k <
plot (k, dbinom(k, n, pi/10, log = TRUE), type = "l", ylab = "log density",
UE
lines(k, log(dbinom(k, n, pi/10)), col

You should explain your problem, rather than just dumping code here. Also add the error messages. You can't expect people to work out your problem.

But anyway, change this:

x[i]<- # from this

x[i] # to this (remove the arrow)

and it works. Though I assume that this is not what you want, though you haven't explained it.

1 Like

that line and the above two lines are missing codes,
in this problem we have a normal distribution and we need to fill lower and upper bound with qnorm() function(which I am confused about)
and the prove in x[i] mean is between upper and lower bound

Please take a look at the homework policy: FAQ: Homework Policy Update your question or delete it if you can't meet the criteria to post a homework question.

2 Likes

Delete <- in X[i] line

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.