On 12-07-22 3:37 PM, Mary Kindall wrote:
I have a value
a=300

observation (x) = sample(1:50)

How to find a p-value from this. I need to show that "a" is different fom
mean(x).
Thanks


This question doesn't really make sense. sample(1:50) gives you the same sample as 1:50 does, just in a different order. So the mean is guaranteed to be 25.5, which is obviously different from 300.

If you really did have a random sample from some unknown distribution and you wanted to test whether the mean of that distribution is different from 300, then Henrik's suggestion is reasonable for most distributions.

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to