Ilya Brin - Software Engineer

History is written by its contributors

Probability Theory: байесовская статистика для A/B тестов на Go

2025-04-29 5 min read Mathematics Ilya Brin

Привет, любители Go и статистики!

A/B тестирование повсюду: цвета кнопок, цены, алгоритмы. Но большинство реализаций использует частотную статистику.

Байесовский подход даёт вероятность того, что вариант лучше, а не просто “статистически значимо”.

Разберемся в деталях и реализуем это на Go.

Continue reading

Linear Regression in Go: From Zero to Production

2025-04-28 8 min read Golang Machine-Learning Ilya Brin

Hey Go developer!

📊 Think machine learning is only for Python developers? Want to add predictive analytics to your Go service but afraid of math?

While others import sklearn, you’ll learn how to implement linear regression in Go from scratch and take it to production-ready solution.


1. What is Linear Regression and Why Does a Go Developer Need It?

In simple terms

Linear regression is a way to find a straight line that best describes the relationship between variables. Like stretching a thread through a cloud of points on a graph.

Continue reading

Probability Theory: Bayesian Statistics for A/B Testing in Go

2024-01-18 5 min read Mathematics Ilya Brin

A/B testing is everywhere: button colors, pricing, algorithms. But most implementations use frequentist statistics. Bayesian approach gives you probability of being better, not just “statistically significant”. Let’s implement it in Go.

Frequentist vs Bayesian

Frequentist: “Is the difference statistically significant?”

  • p-value < 0.05 → reject null hypothesis
  • Doesn’t tell you probability of A being better than B

Bayesian: “What’s the probability that B is better than A?”

  • Direct answer: “B is better with 95% probability”
  • Updates beliefs as data arrives

Basic A/B Test

type Variant struct {
    Name        string
    Conversions int
    Visitors    int
}

func (v *Variant) Rate() float64 {
    if v.Visitors == 0 {
        return 0
    }
    return float64(v.Conversions) / float64(v.Visitors)
}

Beta Distribution

For conversion rates, we use Beta distribution:

Continue reading