from typing import List
import numpy as np
from scipy.stats import t
[docs]
class BayesianTTestResult:
"""
Represents the results of a Bayesian Correlated t-test.
Attributes:
posterior_probabilities (dict): A dictionary containing the probabilities
for the left, rope, and right regions of the posterior distribution.
approximated (bool): Indicates if the posterior distribution is approximated
(True if approximated, e.g., by MCMC sampling, and False if exact).
parameters (dict): The parameters used for running the Bayesian t-test,
specifically 'rho' and 'rope'.
posterior (dict): A dictionary containing the density, cumulative, and
quantile functions for the posterior distribution.
additional (dict): Additional details about the posterior distribution,
such as degrees of freedom, mean, and standard deviation.
"""
def __init__(self, posterior_probs, approximated, parameters, posterior, additional):
"""
Initializes a new instance of the BayesianTTestResult class.
Args:
posterior_probs (dict): Probabilities for the left, rope, and right regions.
approximated (bool): Whether the posterior distribution is approximated.
parameters (dict): Parameters used in the Bayesian t-test.
posterior (dict): Functions related to the posterior distribution.
additional (dict): Additional details about the posterior distribution.
"""
self.posterior_probabilities = posterior_probs
self.approximated = approximated
self.parameters = parameters
self.posterior = posterior
self.additional = additional