Derivation
Here we find the biweight midcorrelation of two vectors
and
, with
items, representing each item in the vector as
and
. First, we define
as the median of a vector
and
as the median absolute deviation (MAD), then define
and
as,

Now we define the weights
and
as,

where
is the identity function where,

Then we normalize so that the sum of the weights is 1:
![{\displaystyle {\begin{aligned}{\tilde {x}}_{i}&={\frac {\left(x_{i}-\operatorname {med} (x)\right)w_{i}^{(x)}}{\sqrt {\sum _{j=1}^{m}\left[(x_{j}-\operatorname {med} (x))w_{j}^{(x)}\right]^{2}}}}\\{\tilde {y}}_{i}&={\frac {\left(y_{i}-\operatorname {med} (y)\right)w_{i}^{(y)}}{\sqrt {\sum _{j=1}^{m}\left[(y_{j}-\operatorname {med} (y))w_{j}^{(y)}\right]^{2}}}}.\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4ddaa71533c2d782bdd2b7812536299d3ccc19b9)
Finally, we define biweight midcorrelation as,
