<form id="esForm" method="post">
<table class="inline" id="info">
<tr>
<th colspan="2" class="centeralign"> Group 1 (Treatment) </th>
</tr>
<tr>
<td>Sample size</td>
<td>
<input type="text" name="n1" value="100">
</td>
</tr>
<tr>
<td>Sample mean</td>
<td>
<input type="text" name="m1" value="1">
</td>
</tr>
<tr>
<td>Sample variance</td>
<td>
<input type="text" name="v1" value="1">
</td>
</tr>
<tr>
<th colspan="2" class="centeralign"> Group 2 (Control) </th>
</tr>
<tr>
<td>Sample size</td>
<td>
<input type="text" name="n2" value="100">
</td>
</tr>
<tr>
<td>Sample mean</td>
<td>
<input type="text" name="m2" value="0">
</td>
</tr>
<tr>
<td>Sample variance</td>
<td>
<input type="text" name="v2" value="1">
</td>
</tr>
<tr>
<th colspan="2" class="centeralign"> Upload data </th>
</tr>
<tr>
<td>Select your file</td>
<td>
<input type="file" name="userData">
</td>
</tr>
<tr><td>Data information</td><td>
<select name="data" id="data">
<option value="0">No variable names</option>
<option value="1">With variable names</option>
</select></td></tr>
<tr>
<th colspan="2" class="centeralign"> Options </th>
</tr>
<tr>
<td>Confidence level</td>
<td>
<input type="text" name="cl" value="0.95">
</td>
</tr>
<tr>
<td>Number of bootstraps</td>
<td>
<input type="text" name="nboot" value="1000">
</td>
</tr>
<tr>
<td>Type of CI</th>
<td>
<select name="type" id="type">
<option value="theory">Theoretical</option>
<option value="bootstrap">Bootstrap</option>
</select>
</td>
</tr>
</table>
<input type="hidden" name="note" value="independent two-sample t-test" />
<input type="submit" value="Calculate" /> </form>
<br /> <br />
<div id=output> </div>
<script src="../../lib/jquery-1.9.1.js"></script>
<script>
// Save a reference to this version
var jQueryWP = $.noConflict(true);
</script>
<script type="text/javascript">
jQueryWP("#esForm").on('submit', (function(e) {
e.preventDefault();
jQueryWP.ajax({
url: "/effectsize/cohensd/run.php",
type: "POST",
data: new FormData(this),
contentType: false,
cache: false,
processData: false,
success: function(data) {
jQueryWP("#output").html(data);
},
error: function() {}
});
}));
</script>
For studying the standardized group mean difference in an independent two-sample design, the most popular effect size measure is defined as
$$ \delta = \frac{\mu_1 - \mu_2}{\sigma} $$
where $\mu_1$ and $\mu_2$ are the population means of the two groups and $\sigma$ is the common standard deviation for the two populations.
One estimator of the population effect size is Cohen's d. It is calculated as
$$ d = \frac{\bar{y}_1 - \bar{y}_2}{\sqrt{\frac{(n_{1}-1)s_{1}^{2}+(n_{2}-1)s_{2}^{2}}{n_{1}+n_{2}-2}}} $$
where $n_1$ and $n_2$ are sample sizes, $\bar{y}_1$ and $\bar{y}_1$ are sample means, and $s_1^2$ and $s_2^2$ are sample variances under the two different conditions, respectively.
Algina and Keselman (2003) constructed a confidence interval for the population effect size based on a non-central t-distribution. In the method, one first gets the lower and upper bounds of the non-centrality parameter as $\lambda_L$ and $\lambda_U$ by solving
$$2[1-pt(d/\sqrt{1/n_{1}+1/n_{2}},n_{1}+n_{2}-2,\lambda_{L})]=1-\alpha$$
and
$$2[1-pt(d/\sqrt{1/n_{1}+1/n_{2}},n_{1}+n_{2}-2,\lambda_{U})]=\alpha$$
where $pt$ is the cdf of the t-distribution.
Now the confidence interval is given by
$$ \left[\lambda_L \sqrt{\frac{1}{n_{1}}+\frac{1}{n_{2}}}, \lambda_U \sqrt{\frac{1}{n_{1}}+\frac{1}{n_{2}}}\right] $$
Cohen's d is a biased estimator of the population effect size for standardized group mean difference. An alternative measure is Hedges' g.
Algina, J., & Keselman, H. J. (2003). Approximate confidence intervals for effect sizes. Educational and Psychological Measurement, 63, 537-553.