The peak in frequency spectrum from sampled data is higher than the true amplitude
10 Hz aliasing down to two Hz which is the Nyquist frequency.
When you sample a Nyquist frequency signal, you only get two samples per period and the two samples are exactly 180 degree apart, i.e. you always get the same numbers with alternating sines.
Which number you get depends on the relative phase fo your sample clock and the signal.If you sample a consine you samle at the peaks and you get [1 -1 1 -1 ...] .  If you sample a sine wave , you sample at the zeros and you get [0, 0, 0, 0 ...]. For any other phase, you get something in between.
Keep in mind that the sampling theorem requires the signal the be bandlimit to &quot;less than half the sample rate&quot; not to &quot;equal or less than half the sample rate&quot;.