# Upper Envelope on XY Data

#### ntlegg

##### New Member
Hi There,

I am working with a set of data where I get a scatter as shown in the attached image. When looking at the data, I can convince myself that some sort of negatively sloping limit defines an upper envelope on the data (see dashed line in attached image). I am wondering if you (the stats community) knows of any sort of statistical test or approach to define and/or evaluate the significance of such an envelope. In a scenario like this, it seems a simple linear regression would fit the data poorly.

I happen to be a stats novice, so any suggestion will likely be very helpful. Thanks for your help.

Best,
Nick

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Interesting question. I don't have an option for you, but would like to see what other propose.

My question is whether this potential ceiling makes sense given the context of your data and project. Is there a feassible threshold or is this something that may or may not really exist.

#### BGM

##### TS Contributor
The envelop is general in the form

$$\frac {y} {\beta_0} + \frac {x} {\beta_1} = 1$$

where $$\beta_0, \beta_1 > 0$$ are the unknown parameters representing the $$y, x$$ intercepts respectively. Define the support

$$\mathcal{S}(\beta_0, \beta_1) = \left\{x \geq 0, y \geq 0, \frac {y} {\beta_0} + \frac {x} {\beta_1} \leq 1 \right\}$$

and assume $$(X, Y)$$ is jointly distributed uniformly in $$\mathcal{S}(\beta_0, \beta_1)$$

Then we know that the joint density will be

$$f_{X,Y}(x, y) = \frac {2} {\beta_0\beta_1}\mathbf{1}\{(x,y) \in \mathcal{S}(\beta_0, \beta_1)\}$$

which the value is just the reciprocal of the area of the right-angled tringular support $$\mathcal{S}(\beta_0, \beta_1)$$ and $$\mathbf{1}$$ is the indicator function.

Under this assumption, the MLE will be the one which minimize the area of the support while covering all the points. And I believe you may obtain the simultaneous confidence interval for the envelop, or the prediction interval.