Hello Everyone: I have a question regarding the r...
# ask-questions
Hello Everyone: I have a question regarding the runInlineExperiment. I did setup a experiment with 60% and 40% variations. But I found that the variation distribution is not consistent and it's not in the given range. here is my code:
Copy code
$growthbook = Growthbook::create()->withAttributes([
            // Targeting attributes
            'id' => time(),
            'someCustomAttribute' => true
   $exp = InlineExperiment::create(
          ["A", "B"]
        )->withWeights([0.6, 0.4]);

        // Either "red", "blue", or "green"
       $v = $growthbook->runInlineExperiment($exp)->value;
Is there anything I am missing here?
Hard to say without knowing the rest of your setup. Are you assigning attributes to your $growthbook sdk? Do your attributes contain an
field (or you can use another hashing field on the experiment via something like
I just updated my post with coomplete code
I am not assigning any session id
using time as an ID is not a great idea as it won’t be sticky
what percentage mix did you get?
I got B more than 6 times
But it should not return it more than 4 times
A also I got more then the defined percentage
the weights are probabilistic, and will have some random variability - how large was your sample size?
I did around 55 samples
Yeah It's not matching.
I did 100 sample with A : 0.6 B: 0.4 And got A = 55 B = 45 5 extra in B Is there any way to solve this? If we use cloud then will it be fixed?
100 is not enough of a sample size, and random assignment variations will dominate