Skip to content

computing MDE for midexperiment power #4271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lukebrawleysmith
Copy link
Collaborator

Currently GrowthBook customers do not have a mechanism for easily determining whether their target MDE is too large. This PR calculates the MDE during the middle of the experiment. By comparing the outputted MDE to the target MDE, the customer can see if their target MDE is much too big.

TODO:
align on how and when to surface the target MDE
all front end work

@@ -193,7 +200,7 @@ def power(self, scaling_factor) -> float:
num_2 = (
adjusted_variance * self.prior_effect.mean / self.prior_effect.variance
)
num_3 = self.target_mde
num_3 = copy.deepcopy(mde)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this copy necessary? seems like num_3 is just used as an input below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just being hyper careful, I don't think a copy is needed.

else:
raise ValueError("mde_bayes is None")

# Current MDE at target power of 0.8 should result in computed power of 0.8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukebrawleysmith , does this test look right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, and it's a good sanity check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants