What I am trying to achieve seems pretty simple, but I can't find a function to do it.

I have two arrays of data, X (projected value) and Y (actual value).

Given a new value of x, I want to know the probability of y=#

Here's a table for illustration

X Y
1 3
2 3
3 7
4 7
5 11


Given X=3, what is p. for y=6?

That's of course very simplified; I have 1000 paired values for X and Y.

What I have done until now is use a list of (X+1) and (X-1). From there I percent rank y=# within that population. Is there a better way to accomplish this?


Thanks in advance,

Kevin