def noiseVariance(SNR, Eb):
    """
    Given an SNR in dB and an energy per bit Eb, calculate the noise variance N0.
    Note: This calculates Eb / gamma, where gamma is the SNR on a linear scale.
    """
    return Eb / (10 ** (SNR/10))