# R, <s>30</s> 22 bytes

###code
    cat(runif(1)<1/scan())          #new
    f=function(N)cat(runif(1)<1/N)  #old

It generates a number from a uniform distribution (0 to 1) and should evaluate to true 1/n of the times.