def lightness_correlate(Y_b, Y_w, Q, Q_w):
    """
    Returns the *Lightness* correlate :math:`J`.

    Parameters
    ----------
    Y_b : numeric
         Tristimulus values :math:`Y_b` the background.
    Y_w : numeric
         Tristimulus values :math:`Y_b` the reference white.
    Q : numeric
        *Brightness* correlate :math:`Q` of the stimulus.
    Q_w : numeric
        *Brightness* correlate :math:`Q` of the reference white.

    Returns
    -------
    numeric
        *Lightness* correlate :math:`J`.

    Examples
    --------
    >>> Y_b = 100.0
    >>> Y_w = 100.0
    >>> Q = 22.209765491265024
    >>> Q_w = 40.518065821226081
    >>> lightness_correlate(Y_b, Y_w, Q, Q_w)  # doctest: +ELLIPSIS
    30.0462678...
    """

    Z = 1 + (Y_b / Y_w) ** 0.5
    J = 100 * (Q / Q_w) ** Z

    return J