Puedes simplificar el código aún más:
Código Delphi
[-] randomize;
u:= random(random(1));
if (u < 0.1) then
N:=0
else if (u < 0.2)then
N:=1
else if (u < 0.45)then
N:=2
else if (u < 0.75)then
N:=3
else if (u >= 1)
N=4;
aunque no entiendo muy bien el porqué del doble uso de random