In MATLAB, given a normal distribution about a value p how can I see the probability of p being greater than a value p*?

StackOverflow https://stackoverflow.com/questions/22099193

Question

I know the title is vague, in all honesty I'm having trouble putting my problem in to words. I want to say that given an initial value, which is a normal distribution about p, how can I find the probability that p>p*, where p* is a critical value.

I.e. I take p = 1g (I'm working with drugs, so its 1 gram), and assume that this is normally distributed through cells in a culture. I know that having over a certain amount of drug in a cell will kill the cell, call that amount p*. How can I say how many cells will die because the amount of drug in them is greater than p*?

I hope this makes sense.

Many thanks.

Was it helpful?

Solution

You are just looking for the CDF or cumulative density function which is simply the integral of the PDF or probability distribution function. So now it depends on if you have collecting data or simulating data. If you're collecting data then you'll want the ecdf function. If you're simulating data, i.e. you have chosen parameters for your distribution, then you can use the cdf function. Either way it's going to be a simple matter of reading your point off the output of those functions.

EDIT:

Just a quick correction to the above, the CDF is P(X <= x) and you want P(X >= x), so it should be trivial to convert. Either flip your data around, or maybe 1-CFD or something like that.

OTHER TIPS

You need to know the mean and standard deviation of your distribution, and then use normcdf (Statistics Toolbox):

mu = 1; %// your p value is the distribution mean, I gather
sigma = .2; %// you don't specify sigma in your question
x = 1.3; %// your p* value
result = 1-normcdf(x,mu,sigma);

If you don't have the Statistics Toolbox, you can use erfc, which is a standard Matlab function:

result = .5*erfc((x-mu)/sigma/sqrt(2));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top