The key is to know how power is defined and what is actually being measured.
Imagine a 10V signal passed through a 10 ohm source resistor and then a 10 ohm attenuator
The input signal power to the 10 ohm attenuator is measured by multiplying the RMS voltage and current over a load if the attenuator were to be removed and replaced with a load matched to the source (10 ohms). In this case pretend RMS voltage is 10V and not the amplitude. The current will be 0.5A and RMS voltage 5V, giving 2.5W.
The output signal power from the attenuator is the voltage and current over the load if the load is matched to the source + attenuator. In this case 20 ohm load. The current will be 0.25A and RMS voltage over the load will be 5V. Output power is therefore 1.25W. This is a loss of 2, i.e. a gain of 0.5.
The input noise power to the attenuator is the Johnson–Nyquist noise from the source resistor.that is dissipated in a matched load. In this example the source has a noise temperature of 290K, and the noise power dissipated in a matched load will be kT0B. The output noise is the noise power from the source and attenuator across a matched load (20 ohms). This is determined from the equation for the noise of 2 resistors in series:
$$\frac{R_ST_A + R_ST_A}{R_S+R_A}$$
Because the resistance of the source and the attenuator is the same, the noise into a matched load is
$$k\frac{T_S + T_A}{2}B$$
If we give the physical temperature of the attenuator to be 290K then you get 290kB. If you give it the physical temperature of 350K then it will be 320kB.
$$F=\frac{S_i/N_i}{S_o/N_o} $$
$$ = \frac{ 2.5(W) / 290kB(W)}{1.25(W) / 320kB(W)}$$
$$= 2.206$$
This is the same as the similar definition
$$ F = \frac{GT_i+T_a} {GT_i}$$
$$ = 1 + \frac{T_a} {GT_i}$$
$$ = 1 + \frac{LT_a} {T_i}$$
$$ = 1 + \frac{T_e} {T_i}$$
$$ = 1 + \frac{(L-1)T_A} {T_i}$$
$$ = 1 + \frac{(2-1)350} {290}$$
$$ = 2.206$$
So L=F only when source and physical temperature of attenuator is the same
Temperature is referenced to a specific stage in the component chain.
The equivalent temperature of each component in the chain (if the input noise temperature to the chain is T0 is
$$T_e=(F-1)T_0$$
The equivalent temperature referenced to the beginning of the chain is the sum of the equivalent temperatures divided by the gain of the components before them (in order to mathematically achieve the Tsub>e at the actual input of the component, which is the noise added by the component referred to the input).
If the whole chain is referred to the output, then the output temperature is the sum of the equivalent input temperatures multiplied by the gain of all the components after each individual component
The noise figure is
$$1+(F_1-1) + \frac{F_2-1}{G_1}+\frac{F_3-1}{G_1G_2}...$$
$$=1+\frac{T_e}{T_0}$$
Where Te is the input referred temperature to the whole chain