I have two exclusive groups of people and a counter of how many events happened for each group.
Lets say group 1 has 7000 people and group 2 has 3000 people. group 1 had 50 events and group 2 had 40 events.
I'm calculating the event percentage for each group for example for group1 its 50/7000. for group 2 its 40/3000.
I want to calculate how much statistical validity these results have (in other words is the groups large enough or I need to collect more data). Probably in percentage (where >95% means its valid statistically)
Can someone point me to how to do it. I need to implement it in PHP code. I have little statistics knowledge. I think it involves square chi function but I'm not sure how to use the data with PHP chi square function http://www.php.net/manual/en/function.stats-cdf-chisquare.php
ADDITIONAL INFO: We're talking about visitors to a web store. I divide them randomly to 30% group B (test group) and 70% group A. I expose gruop A to a certain message. I compare the conversion rates of the groups (% of visitors who buy something). And I want to know when the samples are large enough to be statistically significant.