def compute_monte_carlo_pi(data):
    """
    Calculate Monte Carlo Pi approximation for a given byte array.

    Keyword arguments:
    data -- data bytes
    """
    set_length = int(len(data) / 2)
    r_square = 128 * 128
    circle_surface = 0
    for i in range(set_length):
        if (data[i * 2] - 128) ** 2 + (data[i * 2 + 1] - 128) ** 2 <= r_square:
            circle_surface += 1
    return 4 * circle_surface / set_length
