def get_group_b_samples_by_spec(self) -> np.array: return ( np.concatenate([ NormalSampler(n=int(self.n_1 / 2), mu=self.mu_C1, sigma_sq=self.sigma_sq_C1).get_samples(), NormalSampler(n=int(self.n_2 / 2), mu=self.mu_I2, sigma_sq=self.sigma_sq_I2).get_samples(), NormalSampler(n=int(self.n_3 / 2), mu=self.mu_Ipsi, sigma_sq=self.sigma_sq_Ipsi).get_samples()]) )
def get_group_a_samples(self) -> np.array: return ( np.concatenate([ NormalSampler(n=int(self.n_1 / 2), mu=self.mu_I1, sigma_sq=self.sigma_sq_I1).get_samples(), NormalSampler(n=int(self.n_2 / 2), mu=self.mu_C2, sigma_sq=self.sigma_sq_C2).get_samples(), NormalSampler(n=int(self.n_3 / 2), mu=self.mu_Iphi, sigma_sq=self.sigma_sq_Iphi).get_samples()]) )
def get_group_b_samples_by_effect(self, effect: float) -> np.array: # Here we only vary the effect, but keep the variance of analysis group B as the same return ( np.concatenate([ NormalSampler(n=int(self.n_1 / 2), mu=self.mu_I1 + effect, sigma_sq=self.sigma_sq_C1).get_samples(), NormalSampler(n=int(self.n_2 / 2), mu=self.mu_C2 + effect, sigma_sq=self.sigma_sq_I2).get_samples(), NormalSampler(n=int(self.n_3 / 2), mu=self.mu_Iphi + effect, sigma_sq=self.sigma_sq_Ipsi).get_samples()]) )
def get_group_b2_samples_by_effect(self, effect: float) -> np.array: group_a_effect = ( (self.n_1 * (self.mu_I1 - self.mu_C1) + self.n_3 * (self.mu_Iphi - self.mu_C3)) / (self.n_1 + self.n_3) ) # For the experiment to see an effect, the effect has to be in excess of what analysis group A achieved # Keep the variance of analysis group B2 as the same as that specified return ( np.concatenate([ NormalSampler(n=int(self.n_2 / 4), mu=self.mu_C2 + group_a_effect + effect, sigma_sq=self.sigma_sq_I2).get_samples(), NormalSampler(n=int(self.n_3 / 4), mu=self.mu_C3 + group_a_effect + effect, sigma_sq=self.sigma_sq_Ipsi).get_samples()]) )
def get_group_b2_samples(self) -> np.array: return ( np.concatenate([ NormalSampler(n=int(self.n_2 / 4), mu=self.mu_I2, sigma_sq=self.sigma_sq_I2).get_samples(), NormalSampler(n=int(self.n_3 / 4), mu=self.mu_Ipsi, sigma_sq=self.sigma_sq_Ipsi).get_samples()]) )
def get_group_a1_samples(self) -> np.array: return ( np.concatenate([ NormalSampler(n=int(self.n_1 / 4), mu=self.mu_C1, sigma_sq=self.sigma_sq_C1).get_samples(), NormalSampler(n=int(self.n_3 / 4), mu=self.mu_C3, sigma_sq=self.sigma_sq_C3).get_samples()]) )