You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A [t-test](https://en.wikipedia.org/wiki/Student%27s_t-test) is a statistical
272
+
hypothesis test that is used to compare two sample means or a sample’s mean against
273
+
a known population mean. The ttest should be used when the means of the samples
274
+
follows a normal distribution but the variance may not be known.
275
+
276
+
TabPy’s pre-deployed t-test implementation can be called using the following syntax,
277
+
278
+
```python
279
+
280
+
tabpy.query(‘ttest’, _arg1, _arg2)[‘response’]
281
+
282
+
```
283
+
284
+
and is capable of performing two types of t-tests:
285
+
286
+
<!-- markdownlint-disable MD029 -->
287
+
1\.[A t-test for the means of two independent samples with equal variance](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.ttest_ind.html)
288
+
This is a two-sided t test with the null hypothesis being that the mean of
289
+
sample1 is equal to the mean of sample2.
290
+
_arg1 (list of numeric values): a list of independent observations
291
+
_arg2 (list of numeric values): a list of independent observations equal to
292
+
the length of _arg1
293
+
294
+
Alternatively, your data may not be split into separate measures. If that is
295
+
the case you can pass the following fields to ttest,
296
+
297
+
_arg1 (list of numeric values): a list of independent observations
298
+
_arg2 (list of categorical variables with cardinality two): a binary factor
299
+
that maps each observation in _arg1 to either sample1 or sample2 (this list
300
+
should be equal to the length of _arg1)
301
+
302
+
2\.[A t-test for the mean of one group](https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.stats.ttest_1samp.html)
303
+
_arg1 (list of numeric values): a list of independent observations
304
+
_arg2 (a numeric value): the known population mean
305
+
A two-sided t test with the null hypothesis being that the mean of a sample of
306
+
independent observations is equal to the given population mean.
307
+
308
+
The function returns a two-tailed [p-value](https://en.wikipedia.org/wiki/P-value)
309
+
(between 0 and 1). Depending on your [significance level](https://en.wikipedia.org/wiki/Statistical_significance)
310
+
you may reject or fail to reject the null hypothesis.
311
+
<!-- markdownlint-enable MD029 -->
312
+
268
313
## Providing Schema Metadata
269
314
270
315
As soon as you share your deployed functions, you also need to share metadata
0 commit comments