I have many 2-dimensional data-points (x,y) and I know that there is a correlation between x and y. Now, for a certain point P, I want to calculate something like a z-score (in y), given its x-value.

Visually, I imagine something similar to this, just instead of the confidence interval, I would be interested in the expected standard-deviation at the given x-positions:

enter image description here

My real data: 2 3 4 5 6

(Red dot is my point of interest. Blue dots are averaged background-values, after sorting and grouping them by x-value.)

I have over 100 such points and their respective 2d background distributions and I would like to know whether these 100 points, as a whole, are significantly higher in y, than expected for their x-values. Could you give me some tips how to code such an analysis? Is there anything I have to check before attempting such an analysis? I.e. homoscedasticity along x?

  • 1
    $\begingroup$ It depends on precisely what you mean by "as a whole." It is possible to construct prediction intervals for the mean of such "future" observations, or their minimum, or their maximum, or in principle for any function of them. Such intervals rely on assumptions about the data: for instance, are your "100 such points" independent of the other points or not? $\endgroup$ – whuber Mar 1 at 19:04
  • $\begingroup$ Thanks for your useful comment! Each of the 100 red points correspond to completely different experiments on different proteins, so independent. But each red point should depend on the distribution of black dots; these belong to the same experiment/protein, and represent controls. The red color indicates a certain type of treatment. The question is whether the treatment caused a significant difference within those 100 proteins. I am not interested in predictions to further proteins than those 100. $\endgroup$ – KaPy3141 Mar 1 at 19:18
  • $\begingroup$ Alternatively I could select the closest points (in x-space) as reference to my 100 points. $\endgroup$ – KaPy3141 Mar 1 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.