I'm very new to open bugs, I'm able to build a model and compile it but am having trouble with this question.
Basically I have 12 random variables (standard and normally distributed)
I'm given an interval of (-1.644, 1.644).
I am trying to find the probability of where Atleast one of the random variables falls outside the interval.
And also find the probability where exactly 2 random variables fall outside the interval.
So far I'm able to build the model in OpenBUGs
model {
Y ~ dnorm(0,1)
}
But not sure how to integrate the interval part and number of trials of the question into this model in Bugs. I'm easily able to do it in R-Studio with the following. E.g. For exactly 2:
prob=pnorm(1.644, mean = 0, sd = 1, lower.tail=TRUE)-pnorm(-1.644, mean = 0, sd = 1, lower.tail=TRUE)
dbinom(2, 12, 1-prob)
I have been trying to use the "Step function" with no success. ThanksT
Aucun commentaire:
Enregistrer un commentaire