Skip to content
Prev 166491 / 398502 Next

Calculating p-values from your own distribution as an array

Hi -

If I have a hypothetical distribution as an array

distribution<-c(0,1,2,3,4,5,6,7,8,9)

and I want to find the probability there is a value smaller than a new
value.

new_value<-4

(such that I'd get this type of output)

new_value	p-value
4	0.5
3.4	0.4	
3	0.4
0	0.1
-1	0.0

Thanks for the help, I bet this is really easy... :/ 

Stephen