# Estimating the required time of an experiment

#### ravaro

##### New Member
Hi,
I have a case where I would like to estimate the required time (n) need to
get a satisfying result.

The problem, in each time period I have a mean value of 7 incidents, with standard deviation of 1,75. A change is made which is believed to lower the number of incidents by 50%, so we have the value 3,5 to comparison.

I choose for example the confidence interval 95%.

How can I calculate the required time need to get a satisfying result?

I tried Z-test, z = (x - m) / (s / SQRT(n)) where I solved n where z had been chosen as 1,645 (95% confidence interval).

Any ideas?

#### Dason

Your problem isn't very clear to me.

I will point out however that for a 95% CI using a normal distribution the z value is about 1.96 (1.64 is for a 90% CI).

#### ravaro

##### New Member
Thanks for the response.

I will try to explain my problem better. For example, I have three grocery stores, each month there is a number of complaints. We count the number of complaints monthly.

I have now 24 months of data, with on average 7 complaints (each month), standard deviation of 1,75.

I'm going to make a change in my store that I believe will lower the number of complaints by for example 50%. So if I'm using the z-test, my idea is to define the hypothesized population mean ("m" in the equation above) as 3,5 (50% of the current complaints mean value).

My Question Is: For how long will I need to run my experiment to have enough data to compare (to the old data) and get a satisfying results. (So you can say that I am trying to calculate how big the "sample size" needs to be.)

How can this be calculated with a confidence interval already defined.

------------

The way I estimated this at first was using the z-test, and solving "n".

n = (s^2*z^2)/(m-x)^2

where
z = z-score
x = sample mean
m = hypothesized population mean
s = population deviation
n = sample size

BUT I THINK THIS IS NOT CORRECT, ANY SUGGESTIONS HOW THIS CAN BE DONE? Thanks

#### SPR

##### New Member
Hello Ravaro,

I think that if you will run your experiment for 24 months then you will have two equal size samples and could calulcate and compare their means. Other possible approach is to use say 6 or 12 months of original data and then compare them to 6 or 12 months of experimental data. However, shorter samples produce higher std for original data.

Sincerely,
SPR

#### ravaro

##### New Member
Any ideas on how to estimate the needed sample size (length of time needed before the experiment is started)??