Hey! First time thinking about using namespaces a...
# ask-questions
t
Hey! First time thinking about using namespaces and I want to make sure I'm setting this up correctly. We have an experiment A running for some users newer than a certain timestamp. I used the
Percent of traffic included in this experiment
to narrow it down to only 50% of eligible users go into the test. Now i want to make this mutually exclusive with something else at a 50-50 split. I set up a namespace and gave am thinking of giving experiment A 50% of the namespace and then setting
Percent of traffic included in this experiment
to 100%. Would this yield the same result? Will I inadvertently change which bin people are going to by switching to a namespace? Thanks!
1
f
Hi David: How it works in the code is that there is an additional hashing of the user attribute and namespace name, after the first hash and assignment call. So Experiment A at 50% total exposure, and having 50% of a namespace, would limit the total potential traffic to 25% of the overall. When you run the other experiment on the other 50% of the namespace at 100% exposure (50/50), it will be exposed to potentially 50% of your total traffic. You will not cause anyone to switch variations. Namespaces only reduce who could potentially be included in the experiment.
f
To clarify, switching from 50% included to 100% and adding a namespace will change which users are part of the experiment, but it won't cause anyone to switch variations. Approximately half of the people who were part of the test originally will now be excluded (because of the namespace). And approximately half of the people who were originally excluded from the test will now be included. So it's not terrible, but it still could add quite a bit of variance to the results. Ideally, you would be able to plan ahead and use a namespace from the start, but that's not always possible.
t
@future-teacher-7046 Bit confused with
adding a namespace will change which users are part of the experiment, but it won't cause anyone to switch variations.
Do you mean it will change what bucket an incremental user goes into but existing users who are already in the variant will stay? Also yes, will certainly try to use namespaces at the start vs midway through in the future
f
There will still be 25% of your users in each variation both before and after the change. But it won't be the exact same 25%. Some incremental users will be added to each variation and some existing users will be removed. There won't be any cases though where a user was previously in the experiment as variation A, but is now assigned to variation B. Users will either see the same variation they saw before or they will be entirely excluded from the experiment.
h
Ok so that’s less good than we thought. Is there any alternative way we can do this? We specifically want to run an A/B test on just the 50% of the users who aren’t in the A/B test here, but without changing who is in the first test?
Because specifically what I don’t want to happen is someone who is in the Variant B of the original A/B test, to now be completely taken out of the experiment and no longer see that screen
f
You could do it in code instead of using a namespace.
Copy code
const feature1 = growthbook.evalFeature("my-feature");
if (!feature1.experiment) {
  const feature2 = growthbook.evalFeature("my-other-feature")
}
So keep the original test as 50% of traffic. Set the other test as 100%. The other test will only be run if the user is part of the 50% not in the first test.
h
OK sounds like this is the move