# Thread: Probability vs sample size graph.

1. ## Probability vs sample size graph.

Hi, if have a question about how a graph of probability vs sample size might look. I know the line would never be linear but it could either sigmoid or logarithmic. Which? Why? To clarify, I am looking at how probability changes depending on how many samples you have. I know p would be very low when you have few samples but how does it progress from there?

Thanks!

2. ## Re: Probability vs sample size graph.

You'll need to be more specific. What probability are you talking about?

3. ## Re: Probability vs sample size graph.

Sorry, the result of a significance test. I'm not sure the exact nature of the imagined test is too important, I'm just curious as to how the p value changes with sample size.

I know that there will be a point at which adding extra values lends little extra to statistical significance but what happens when you have few samples? I know that drawing a statistically significant will difficult but how does that change as you add more samples? Would the improvement in significance be logarithmic or sigmoid?

4. ## Re: Probability vs sample size graph.

I think he means this

Originally Posted by Morganb4
... graph of probability vs sample size
You want to know how the graph of the probability of _____?____ vs sample size might look? Did you mean power? power = Pr(reject H0 | H0 is false)

5. ## Re: Probability vs sample size graph.

And this graph would be given that a true effect exists. I would imagine that if you had p-value for significance test on y-axis and sample size on x-axis, it would look like exponential decay then become asymptotic.

6. ## The Following User Says Thank You to hlsmith For This Useful Post:

Morganb4 (05-23-2014)

7. ## Re: Probability vs sample size graph.

Originally Posted by hlsmith
And this graph would be given that a true effect exists. I would imagine that if you had p-value for significance test on y-axis and sample size on x-axis, it would look like exponential decay then become asymptotic.
Thanks. This was pretty much what I concluded. The greater the sample size, the better the p value but it also becomes harder to make a change in the p value which is what you expect - if your result is already highly significant, adding more results won't really change that and so it becomes asymptotic .

8. ## Re: Probability vs sample size graph.

if you're an R user, you can get a good sense of power vs. sample size by using the code under the calculators here http://powerandsamplesize.com

in fact that's one of the main motivations of the site -- the ability to quickly/easily get an idea of how power or sample size changes for different values of input parameters ... sometime in the near future there will be power vs. sample size graphs (for now, can just plot either vs. input parameters)

for example, using the code given here http://powerandsamplesize.com/Calcul...ample-Equality
we can do
Code:
``````mu=2
mu0=1.5
sd=1
alpha=0.05
Power=function(n){
z=(mu-mu0)/sd*sqrt(n)
pnorm(z-qnorm(1-alpha/2))+pnorm(-z-qnorm(1-alpha/2))
}
nList=seq(10,40,length=100)
plot(nList,Power(nList))``````

 Tweet

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts