so I have a data set of 1500 proteins. I then identify a set of 50 proteins and lets say 40 of these 50 have a certain function. I then draw 1000 random samples of size 50 from my initial 1500 protein data set and look at each sample how many of them have said function. I then get a mean of 27 and a SD of 3 for the 1000 samples.
How do I calculate the p-value to proof that in my set of 50 proteins the proteins with a certain function are over represented (compared to my 100 random samples chosen). I assume that my 1000 sample distribution is Gaussian.
My first thought was that I use a t-test but if I try that R gives me an error that I have to few observations of one variable.