Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ The currently implemented detectors are listed in the following table.
<tr>
<td style="text-align: center; border: 1px solid grey; padding: 8px;">U</td>
<td style="text-align: center; border: 1px solid grey; padding: 8px;">N</td>
<td style="text-align: center; border: 1px solid grey; padding: 8px;">Welch's T-Test</td>
<td style="text-align: center; border: 1px solid grey; padding: 8px;">Welch's t-test</td>
<td style="text-align: center; border: 1px solid grey; padding: 8px;"><a href="https://doi.org/10.2307/2332510">Welch (1947)</a></td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Welch's T-test module."""
"""Welch's t-test module."""

from typing import Optional, List, Union

Expand All @@ -14,7 +14,7 @@


class WelchTTest(BaseStatisticalTest):
"""Welch's T-test [welch1947generalization]_ detector.
"""Welch's t-test [welch1947generalization]_ detector.

:References:

Expand All @@ -40,10 +40,20 @@ def __init__(
)

def _statistical_test(
self, X_ref: np.ndarray, X: np.ndarray, **kwargs # noqa: N803
self,
X_ref: np.ndarray, # noqa: N803
X: np.ndarray,
**kwargs,
) -> StatisticalResult:
test = ttest_ind(
a=X_ref, b=X, equal_var=False, alternative="two-sided", **kwargs
a=X_ref,
b=X,
equal_var=False,
alternative="two-sided",
**kwargs,
)
test = StatisticalResult(
statistic=test.statistic,
p_value=test.pvalue,
)
test = StatisticalResult(statistic=test.statistic, p_value=test.pvalue)
return test