parameters: (
          control_variant: Variant, test_variants: List[Variant], priors: Tuple[int, int] = (1, 1)
      )
return_statement: return calculate_probability_of_winning_for_each([control_variant, *test_variants])
docstring: Calculates probability that A is better than B. First variant is control, rest are test variants.
          
          Supports maximum 4 variants today
  
          For each variant, we create a Beta distribution of conversion rates, 
          where alpha (successes) = success count of variant + prior success
          beta (failures) = failure count + variant + prior failures
  
          The prior is information about the world we already know. For example, a stronger prior for failures implies
          you'd need extra evidence of successes to confirm that the variant is indeed better.
  
          By default, we choose a non-informative prior. That is, both success & failure are equally likely.
docstring_summary: Calculates probability that A is better than B. First variant is control, rest are test variants.
          
          Supports maximum 4 variants today
docstring_tokens: Calculates probability that A is better than B . First variant is control rest are test variants . Supports maximum 4 variants today
function: def calculate_results(
          control_variant: Variant, test_variants: List[Variant], priors: Tuple[int, int] = (1, 1)
      ) -> List[Probability]:
          """
          Calculates probability that A is better than B. First variant is control, rest are test variants.
          
          Supports maximum 4 variants today
  
          For each variant, we create a Beta distribution of conversion rates, 
          where alpha (successes) = success count of variant + prior success
          beta (failures) = failure count + variant + prior failures
  
          The prior is information about the world we already know. For example, a stronger prior for failures implies
          you'd need extra evidence of successes to confirm that the variant is indeed better.
  
          By default, we choose a non-informative prior. That is, both success & failure are equally likely.
          """
  
          if not control_variant:
              raise ValidationError("No control variant data found", code="no_data")
  
          if len(test_variants) > 3:
              raise ValidationError("Can't calculate A/B test results for more than 4 variants", code="too_much_data")
  
          if len(test_variants) < 1:
              raise ValidationError("Can't calculate A/B test results for less than 2 variants", code="no_data")
  
          return calculate_probability_of_winning_for_each([control_variant, *test_variants])
function_tokens: def calculate_results ( control_variant : Variant , test_variants : List [ Variant ] , priors : Tuple [ int , int ] = ( 1 , 1 ) ) -> List [ Probability ] : if not control_variant : raise ValidationError ( "No control variant data found" , code = "no_data" ) if len ( test_variants ) > 3 : raise ValidationError ( "Can't calculate A/B test results for more than 4 variants" , code = "too_much_data" ) if len ( test_variants ) < 1 : raise ValidationError ( "Can't calculate A/B test results for less than 2 variants" , code = "no_data" ) return calculate_probability_of_winning_for_each ( [ control_variant , * test_variants ] )