The first solution that comes to mind is:
Code:
on *:TEXT:hi:#:{
  var %r = $rand(1,N)
  if (%r == 1) msg $chan hi $nick $+ .
}

Where N is the 1 in N times you want it to happen on average. E.g. 1 in 3 times.