From what I understood, for each of the N
random point you want to flip a coin to decide whether to select it or not (where the coin has a p=0.25
probability of success!)
data = rand(N,2); %# generate random points
index = (rand(N,1) <= p); %# roll coins to pick with prob p
data(~index, :) = []; %# keep only selected points
This ends up being equivalent to only generating p*N
random points in the first place (at least you approach this number as N
grows larger)...
data = rand(p*N, 2); %# directly generate p*N number of points
you can test that last statement for various values of N:
fprintf('1st = %d \n', p*N)
fprintf('2nd = %d \n', sum(rand(N,1) <= p))