# Variance

Published articles for Variance.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Bootstrap Confidence Intervals for LLM Evaluation

DevFeed: [Bootstrap Confidence Intervals for LLM Evaluation](<https://devfeed.tech/articles/bootstrap-confidence-intervals-for-llm-evaluation-29996.md>)

Original publisher: [Read original article](<https://engineering.indeedblog.com/blog/2026/07/bootstrap-confidence-intervals-for-llm-evaluation/>)

Author: James Fiedler

Published: 2026-07-08T14:30:02Z

Content type: article

Language: en

Sources: [Indeed](<https://devfeed.tech/sources/indeed.md>)

Topics: [LLM evaluation / benchmarking](<https://devfeed.tech/topics/llm-evaluation-benchmarking.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [analytics](<https://devfeed.tech/tags/analytics.md>), [batching](<https://devfeed.tech/tags/batching.md>), [confidence-interval](<https://devfeed.tech/tags/confidence-interval.md>), [data-science](<https://devfeed.tech/tags/data-science.md>), [developers](<https://devfeed.tech/tags/developers.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [llm](<https://devfeed.tech/tags/llm.md>), [llm-evaluation](<https://devfeed.tech/tags/llm-evaluation.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [metric](<https://devfeed.tech/tags/metric.md>), [performance](<https://devfeed.tech/tags/performance.md>), [research](<https://devfeed.tech/tags/research.md>), [variance](<https://devfeed.tech/tags/variance.md>), [vs](<https://devfeed.tech/tags/vs.md>)

### AI overview

This article explains how to construct confidence intervals for non-deterministic LLM evaluations using bootstrap resampling. It recommends resampling inputs while carrying along all model runs for each selected input, then using the 2.5th and 97.5th percentiles for a 95% interval. It also discusses the tradeoff between the number of inputs and repeated runs, recommending k = 3 or 5 when feasible.

### Source excerpt

Introduction As Large Language Models (LLMs) move from research prototypes to production systems, the developers of these systems need rigorous performance evaluation. In particular, we need confidence intervals around estimates of system accuracy. However, LLMs introduce a challenge that is unusual for ML systems: they are (operationally) non-deterministic. Even with the temperature set to zero, [...]

## Variance Reduction Below the Randomization Grain

DevFeed: [Variance Reduction Below the Randomization Grain](<https://devfeed.tech/articles/variance-reduction-below-the-randomization-grain-20111.md>)

Original publisher: [Read original article](<https://tech.instacart.com/variance-reduction-below-the-randomization-grain-31719f87a7d2?source=rss----587883b5d2ee---4>)

Author: Tilman Drerup

Published: 2026-07-01T16:28:36Z

Content type: article

Language: en

Sources: [Instacart](<https://devfeed.tech/sources/instacart.md>)

Topics: [experiments](<https://devfeed.tech/topics/experiments.md>)

Tags: [capacity](<https://devfeed.tech/tags/capacity.md>), [causal-inference](<https://devfeed.tech/tags/causal-inference.md>), [economics](<https://devfeed.tech/tags/economics.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [experiment](<https://devfeed.tech/tags/experiment.md>), [experimentation](<https://devfeed.tech/tags/experimentation.md>), [experiments](<https://devfeed.tech/tags/experiments.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [marketplaces](<https://devfeed.tech/tags/marketplaces.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [reduce](<https://devfeed.tech/tags/reduce.md>), [science](<https://devfeed.tech/tags/science.md>), [techniques](<https://devfeed.tech/tags/techniques.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This article explains how marketplace experiments can reduce metric variance below the level at which treatment is randomized. It describes cluster-level randomization for containing interference and shows how fine-grained outcome predictability can improve statistical power and reduce experimentation time.

### Source excerpt

Sergio Camelo, Caitlin Kearns, Matias Cersosimo, and Tilman Drerup As artificial intelligence increases the velocity of engineering and science teams, experimental throughput is set to become a bottleneck for many product decisions. Many companies can now build faster than they can experiment, with queues of good ideas running the risk of not being tested because of lack of experimental capacity. This problem is particularly severe in marketplaces, where the presence of spillover and cannibalization effects between experimental units requires cluster-level randomization techniques. That randomization, in turn, has the unfortunate tendency to substantially reduce statistical power and slow down experimentation. In this post, we show that the predictability of outcomes at fine grains can be exploited to reduce the variance of aggregate metrics, even when experiments themselves are run at a coarse level. Since statistical power depends on metric variability, this yields considerable reductions in experimentation time. The Interference Problem In marketplace settings, behavior and outcomes for individual participants are inherently intertwined. In a delivery marketplace like Instacart, for example, the dispatch system solves a bipartite matching problem between shoppers and customer orders. Since assignments are global and interdependent, matching an order to one shopper means that the same order cannot be matched to another shopper. As a result, changing the handling for a single order creates ripples that affect the orders around it. If an experimenter were to assign a treatment intervention to one of these orders while leaving neighboring orders as controls, the latter would evidently be contaminated. A common response to this problem is to randomize treatments at the level of a cluster, chosen so that interference can stay within it. In food and grocery delivery, that cluster is typically a geographical region. Since every order within a region sees the same treatme

## Outlier Handling at Scale in Experimentation

DevFeed: [Outlier Handling at Scale in Experimentation](<https://devfeed.tech/articles/outlier-handling-at-scale-in-experimentation-30453.md>)

Original publisher: [Read original article](<https://booking.ai/outlier-handling-at-scale-in-experimentation-a8bb140e1ab8?source=rss----4d265f07defc---4>)

Author: Margarida Moreira da Silva

Published: 2026-07-01T13:44:26Z

Content type: article

Language: en

Sources: [Booking.com Data Science](<https://devfeed.tech/sources/booking-com-data-science.md>)

Topics: [experiments](<https://devfeed.tech/topics/experiments.md>), [data](<https://devfeed.tech/topics/data.md>), [Simulation](<https://devfeed.tech/topics/simulation.md>), [Ground truth / benchmark quality](<https://devfeed.tech/topics/ground-truth-benchmark-quality.md>), [plotting](<https://devfeed.tech/topics/plotting.md>)

Tags: [data](<https://devfeed.tech/tags/data.md>), [experimentation](<https://devfeed.tech/tags/experimentation.md>), [experiments](<https://devfeed.tech/tags/experiments.md>), [false-positive](<https://devfeed.tech/tags/false-positive.md>), [outlier-detection](<https://devfeed.tech/tags/outlier-detection.md>), [simulation](<https://devfeed.tech/tags/simulation.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

The article examines how extreme values affect experimentation at Booking.com. It describes permutation tests and simulated A/A experiments for diagnosing distorted p-value distributions, and reports that increasing outlier magnitude and frequency can cause test failures.

### Source excerpt

At Booking.com, thousands of experiments run simultaneously across highly heterogeneous users, from individual travellers to large travel agencies. This means our experiment data regularly contains legitimate but extreme values. When these go unhandled, they distort the statistical conclusions we draw, leading us to scale ideas that don't create value, or to discard ones that do. So, we need outlier handling methods that are reliable, automated, and applicable across diverse metrics without manual intervention. The Problem When extreme values are present in experiment data, they can compromise the estimation of average treatment effects (ATE), leading to unreliable test results and reduced statistical power. Even a single observation can inflate variance enough to mask a real effect or produce a spurious one. In practice, this means we risk shipping changes that appear positive but are not, or killing promising features because noise masked their real effect. At Booking.com's scale, this increase in false conclusions quickly compounds into a meaningful impact on customer experience and business outcomes. A Diagnostic Tool: the Permutation Test One way to assess whether extreme values are distorting results is the permutation test. By permuting over experiment data, we generate hundreds of simulated AA experiments where we know the ground truth: there is no real effect. Plotting the resulting p-values, we expect a uniform distribution. If it instead looks skewed, the underlying data distribution is compromising the validity of results. Plot 1: P-value distributions from simulated A/A tests. Clean normally-distributed estimated effects produce a uniform distribution (left), while the presence of extreme outliers results in skewed p-values (right), indicating a distorted false positive rate.Simulation Evidence: What Drives Failure? We ran AA permutation tests across a range of simulated data distributions to understand when they fail (i.e. not show a uniform p-value di

## A Framework for Assessing Software Tolerance When Using AI Agents

DevFeed: [A Framework for Assessing Software Tolerance When Using AI Agents](<https://devfeed.tech/articles/a-framework-for-engineering-variance-with-ai-agents-27351.md>)

Original publisher: [Read original article](<https://blog.mmckenna.me/the-piston-and-the-cup-holder>)

Author: Matt McKenna

Published: 2025-12-04T13:15:03Z

Content type: opinion

Language: en

Sources: [Matt McKenna](<https://devfeed.tech/sources/matt-mckenna.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Software](<https://devfeed.tech/topics/software.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [code](<https://devfeed.tech/tags/code.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [llm](<https://devfeed.tech/tags/llm.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [tool](<https://devfeed.tech/tags/tool.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This opinion article proposes evaluating software components by their tolerance for logical error and change before using AI tools. It argues that probabilistic AI is better suited to high-tolerance work, while low-tolerance areas such as payments, encryption, mathematics, and idempotency require binary correctness.

### Source excerpt

The Piston and the Cup Holder In mechanical engineering, "tolerance" is the permissible limit of variation in a physical dimension. It is the acknowledgement that the world isn't perfect, and designs needs to account for that. A plastic cup holder in...

## Limitations of Generic Variance Modifiers in Java and Kotlin

DevFeed: [Limitations of Generic Variance Modifiers in Java and Kotlin](<https://devfeed.tech/articles/variance-modifiers-limitations-39219.md>)

Original publisher: [Read original article](<https://kt.academy/article/ak-variance-limitations>)

Published: 2023-02-20T00:15:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Generic Variance](<https://devfeed.tech/topics/generic-variance.md>), [Covariance](<https://devfeed.tech/topics/covariance.md>), [Contravariance](<https://devfeed.tech/topics/contravariance.md>), [Type Parameter](<https://devfeed.tech/topics/type-parameter.md>), [Java](<https://devfeed.tech/topics/java.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [contravariance](<https://devfeed.tech/tags/contravariance.md>), [covariance](<https://devfeed.tech/tags/covariance.md>), [generic-variance](<https://devfeed.tech/tags/generic-variance.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [runtime-errors](<https://devfeed.tech/tags/runtime-errors.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [variance](<https://devfeed.tech/tags/variance.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains how covariance and contravariance affect generic types in Java and Kotlin. It uses Java's covariant arrays to illustrate runtime type errors and describes why Kotlin restricts variance in public in-positions while allowing safe producer and read-only patterns.

### Source excerpt

What limitations generic variance modifiers introduce, and how can we ignore them.

## Kotlin Generic Variance Modifiers

DevFeed: [Kotlin Generic Variance Modifiers](<https://devfeed.tech/articles/kotlin-generic-variance-modifiers-39218.md>)

Original publisher: [Read original article](<https://kt.academy/article/ak-variance>)

Published: 2023-02-08T00:15:00Z

Content type: article

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Generic Variance](<https://devfeed.tech/topics/generic-variance.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Contravariance](<https://devfeed.tech/topics/contravariance.md>), [Covariance](<https://devfeed.tech/topics/covariance.md>), [Type Parameter](<https://devfeed.tech/topics/type-parameter.md>)

Tags: [contravariance](<https://devfeed.tech/tags/contravariance.md>), [covariance](<https://devfeed.tech/tags/covariance.md>), [generic-variance](<https://devfeed.tech/tags/generic-variance.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [variance](<https://devfeed.tech/tags/variance.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This Kotlin tutorial explains invariant, covariant, and contravariant generic type parameters. It shows how variance affects subtype relationships and why covariance is suitable for read-only types, while mutable structures remain invariant for type safety.

### Source excerpt

What are out and in, and how do we use them without even knowing.

## Using the Frisch-Waugh-Lovell Theorem to Improve CUPED Variance Reduction in Online Experiments

DevFeed: [Using the Frisch-Waugh-Lovell Theorem to Improve CUPED Variance Reduction in Online Experiments](<https://devfeed.tech/articles/you-can-t-spell-cuped-without-frisch-waugh-lovell-37906.md>)

Original publisher: [Read original article](<https://www.evanmiller.org/you-cant-spell-cuped-without-frisch-waugh-lovell.html>)

Author: Evan Miller

Published: 2022-07-15T00:35:00Z

Content type: tutorial

Language: en

Sources: [Evan Miller](<https://devfeed.tech/sources/evan-miller.md>)

Topics: [experiments](<https://devfeed.tech/topics/experiments.md>), [math](<https://devfeed.tech/topics/math.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [experiments](<https://devfeed.tech/tags/experiments.md>), [math](<https://devfeed.tech/tags/math.md>), [reduction](<https://devfeed.tech/tags/reduction.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains the mathematical connection between CUPED and partial linear regression through the Frisch-Waugh-Lovell Theorem. It discusses how variance reduction can decrease experiment sample sizes and proposes including a vector of treatments in CUPED regressions for additional variance reduction.

### Source excerpt

A/B tests run faster with CUPED. Here I explain the underlying math, and use it to invent an even better variance-reduction technique for online experiments: You Can't Spell CUPED Without Frisch-Waugh-Lovell

## Star-Projections and How They Work

DevFeed: [Star-Projections and How They Work](<https://devfeed.tech/articles/star-projections-and-how-they-work-25043.md>)

Original publisher: [Read original article](<https://typealias.com/guides/star-projections-and-how-they-work/>)

Author: author@typealias.com (Dave Leeds)

Published: 2018-04-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [generics](<https://devfeed.tech/topics/generics.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [class](<https://devfeed.tech/tags/class.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generic-variance](<https://devfeed.tech/tags/generic-variance.md>), [generics](<https://devfeed.tech/tags/generics.md>), [guide](<https://devfeed.tech/tags/guide.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [programming](<https://devfeed.tech/tags/programming.md>), [star-projection](<https://devfeed.tech/tags/star-projection.md>), [type-projection](<https://devfeed.tech/tags/type-projection.md>), [types](<https://devfeed.tech/tags/types.md>), [use-site-variance](<https://devfeed.tech/tags/use-site-variance.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains how Kotlin star-projections work when a function must accept any kind of a generic. It applies subtyping rules for accepted and returned types to compare star-projections with other type-safe solutions.

### Source excerpt

Have you ever wondered how star-projections work? Or why they change your function parameter and return types? Or why it seems like sometimes you can actually get by without them? In the first article in this series, An Illustrated Guide to Covariance and Contravariance in Kotlin, we uncovered two simple, easy-to-understand rules that illuminate variance, and saw how they applied to regular class and interface inheritance in Kotlin. In the second article, The Ins and Outs of Generic Variance in Kotlin, we saw how those same two rules played out for generics, discovering what type projections are and how they work.

## The Ins and Outs of Generic Variance in Kotlin

DevFeed: [The Ins and Outs of Generic Variance in Kotlin](<https://devfeed.tech/articles/the-ins-and-outs-of-generic-variance-in-kotlin-25037.md>)

Original publisher: [Read original article](<https://typealias.com/guides/ins-and-outs-of-generic-variance/>)

Author: author@typealias.com (Dave Leeds)

Published: 2018-03-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [generics](<https://devfeed.tech/topics/generics.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [contravariance](<https://devfeed.tech/tags/contravariance.md>), [covariance](<https://devfeed.tech/tags/covariance.md>), [function](<https://devfeed.tech/tags/function.md>), [generic-variance](<https://devfeed.tech/tags/generic-variance.md>), [generics](<https://devfeed.tech/tags/generics.md>), [guide](<https://devfeed.tech/tags/guide.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

A tutorial explaining generic variance and type projections in Kotlin. It applies two subtype rules to show why covariance and contravariance work and uses a generic animal collection as an example.

### Source excerpt

Have you ever wondered why generic variance works like it does? Or why Kotlin won't let you use a type parameter as an argument when it's marked as out? Have you wondered why the compiler sometimes won't let you call a certain function on a generic? Yes, generics can seem mysterious, but with just two simple, easy-to-understand rules, we can reason our way through almost everything related to variance.

## An Illustrated Guide to Covariance and Contravariance in Kotlin

DevFeed: [An Illustrated Guide to Covariance and Contravariance in Kotlin](<https://devfeed.tech/articles/an-illustrated-guide-to-covariance-and-contravariance-in-kotlin-25035.md>)

Original publisher: [Read original article](<https://typealias.com/guides/illustrated-guide-covariance-contravariance/>)

Author: author@typealias.com (Dave Leeds)

Published: 2018-02-20T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [generics](<https://devfeed.tech/topics/generics.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [contravariance](<https://devfeed.tech/tags/contravariance.md>), [covariance](<https://devfeed.tech/tags/covariance.md>), [generic-variance](<https://devfeed.tech/tags/generic-variance.md>), [generics](<https://devfeed.tech/tags/generics.md>), [guide](<https://devfeed.tech/tags/guide.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This illustrated Kotlin tutorial explains the foundational concepts behind generic variance. It focuses on subtyping, function arguments and results, and how covariance and contravariance appear in class and interface inheritance.

### Source excerpt

Generics can often seem confusing. How often have you started to solve a problem with generics, only to realize that they don't quite work like you thought they did? The good news is that there are some simple, foundational concepts that underpin generic variance. And once you understand those concepts, you won't have to memorize acronyms or resort to trial-and-error - you'll simply understand how and why they work! In this article, I'm going to cover these foundational concepts, and then demonstrate how they play out in Kotlin class and interface inheritance.

## Out-Projection

DevFeed: [Out-Projection](<https://devfeed.tech/articles/out-projection-25020.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/out-projection/>)

Author: author@typealias.com (Dave Leeds)

Published: 2018-02-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [covariance](<https://devfeed.tech/tags/covariance.md>), [generic](<https://devfeed.tech/tags/generic.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [type-projection](<https://devfeed.tech/tags/type-projection.md>), [use-site-variance](<https://devfeed.tech/tags/use-site-variance.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains Kotlin out-projections, showing how they provide covariance at a use site while preventing operations that accept the projected type parameter. It covers the type-safety limitation and when out-projections are useful compared with declaration-site variance.

### Source excerpt

An out-projection is a kind of type projection that makes a generic covariant, but also causes any functions that accept the type parameter to be unusable in that context. You can think of it this way - In regular life, when some three-dimensional thing casts a shadow, that shadow is a two-dimensional projection of the original object - it's an incomplete representation of it. In the same way, an out-projection is a limited view of the original class.

## Declaration-Site Variance

DevFeed: [Declaration-Site Variance](<https://devfeed.tech/articles/declaration-site-variance-25012.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/declaration-site-variance/>)

Author: author@typealias.com (Dave Leeds)

Published: 2018-01-17T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [covariance](<https://devfeed.tech/tags/covariance.md>), [declaration-site-variance](<https://devfeed.tech/tags/declaration-site-variance.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [property](<https://devfeed.tech/tags/property.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains Kotlin declaration-site variance, including the in and out annotations, the restrictions they impose on type parameters, and the resulting subtyping relationships such as covariance.

### Source excerpt

Declaration-Site Variance is variance that is specified at the point where the generic is defined - for example, in the definition of the class, interface, function, or extension property. To use declaration-site variance, you just have to modify a type parameter with either the in or out variance annotation. By doing this, you limit where you're allowed to use the type parameter, but you also introduce subtyping for your generic, so that, for example, a Box<Dog> can be a subtype of Box<Animal>, whereas otherwise this wouldn't be possible.

## Type Argument

DevFeed: [Type Argument](<https://devfeed.tech/articles/type-argument-25024.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/type-argument/>)

Author: author@typealias.com (Dave Leeds)

Published: 2018-01-10T02:43:41Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [generics](<https://devfeed.tech/topics/generics.md>), [Code](<https://devfeed.tech/topics/code.md>), [context](<https://devfeed.tech/topics/context.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [context](<https://devfeed.tech/tags/context.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generics](<https://devfeed.tech/tags/generics.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [programming](<https://devfeed.tech/tags/programming.md>), [type-argument](<https://devfeed.tech/tags/type-argument.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [type-parameters](<https://devfeed.tech/tags/type-parameters.md>), [type-projection](<https://devfeed.tech/tags/type-projection.md>), [types](<https://devfeed.tech/tags/types.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This article explains type arguments in generics, including how they are specified in type declarations and function calls, inferred by the compiler, and used with variance annotations for type projection. It also distinguishes type arguments from type parameters.

### Source excerpt

A type argument is a specific type, specified by the calling code, that a generic will use in place of a type parameter. If your generic were a light fixture, then the light bulb that's screwed into that light fixture is the type argument. Just as different kinds of light bulbs can be used in a light fixture's socket, different call sites can each specify a different type argument to use in instances of a generic.

## Type Parameter

DevFeed: [Type Parameter](<https://devfeed.tech/articles/type-parameter-25027.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/type-parameter/>)

Author: author@typealias.com (Dave Leeds)

Published: 2018-01-04T03:23:40Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [generics](<https://devfeed.tech/topics/generics.md>), [Code](<https://devfeed.tech/topics/code.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generics](<https://devfeed.tech/tags/generics.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [reification](<https://devfeed.tech/tags/reification.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains type parameters in generics: how they are declared and used, naming conventions, constraints that limit allowable types, variance in generic subtyping, and reified type parameters.

### Source excerpt

A type parameter is a placeholder for an actual type, which gets specified by the code that's using the generic. If you imagine your generic as a light fixture, the type parameter would be the socket where the light bulb goes. Just as you can choose from a variety of different light bulbs to put into that socket, the calling code can choose from a variety of different types to pass to a generic.

## Type Projection

DevFeed: [Type Projection](<https://devfeed.tech/articles/type-projection-25028.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/type-projection/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-12-27T18:18:01Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [declaration-site-variance](<https://devfeed.tech/tags/declaration-site-variance.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generic-variance](<https://devfeed.tech/tags/generic-variance.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [object](<https://devfeed.tech/tags/object.md>), [operations](<https://devfeed.tech/tags/operations.md>), [programming](<https://devfeed.tech/tags/programming.md>), [type-projection](<https://devfeed.tech/tags/type-projection.md>), [use-site-variance](<https://devfeed.tech/tags/use-site-variance.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains Kotlin type projection as a restricted view of an existing type that enables variance and subtyping in specific contexts. It describes how use-site variance produces projections and how projections can restrict operations such as setters.

### Source excerpt

A type projection is a type that has been limited in certain ways in order to gain variance characteristics. Imagine a three-dimensional object that you shine a flashlight onto. Behind that object on the wall is a two-dimensional projection of that object - a shadow. That projection has the same basic shape as the object, but only from one perspective. Type projection is kind of like that - we take an existing object and reduce it to just the attributes or operations that we need at that place in the code.

## Variance Annotation

DevFeed: [Variance Annotation](<https://devfeed.tech/articles/variance-annotation-25029.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/variance-annotation/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-12-04T02:49:24Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [declaration-site-variance](<https://devfeed.tech/tags/declaration-site-variance.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [programming](<https://devfeed.tech/tags/programming.md>), [subtype](<https://devfeed.tech/tags/subtype.md>), [type-argument](<https://devfeed.tech/tags/type-argument.md>), [types](<https://devfeed.tech/tags/types.md>), [use-site-variance](<https://devfeed.tech/tags/use-site-variance.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains variance annotations in Kotlin generics. It covers the out modifier for covariance, the in modifier for contravariance, and the invariant behavior when no variance annotation is declared.

### Source excerpt

A variance annotation is a modifier applied to a type parameter or type argument of a generic, in order to declare its variance. Kotlin defines two variance annotations in its grammar: out and in. out The out modifier is used to declare a type parameter as being covariant. For example: class Box<out T>(private val item: T) { fun getItem(): T = item } With the out variance annotation declared on the type parameter T in this class, subtyping rules can now be applied to Boxes of different types.

## Invariance

DevFeed: [Invariance](<https://devfeed.tech/articles/invariance-25018.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/invariance/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-11-28T03:03:36Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [generics](<https://devfeed.tech/topics/generics.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Java](<https://devfeed.tech/topics/java.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [classes](<https://devfeed.tech/tags/classes.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generics](<https://devfeed.tech/tags/generics.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [invariance](<https://devfeed.tech/tags/invariance.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [properties](<https://devfeed.tech/tags/properties.md>), [subtype](<https://devfeed.tech/tags/subtype.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains invariance in generic subtyping. It shows that generic types can remain unrelated even when their component types have a subtype relationship, and discusses default invariance in Kotlin and Java, multiple type parameters, and variance in inherited properties and function types.

### Source excerpt

When dealing with simple classes, subtyping is straightforward. But once we start talking about generics, subtyping rules become more complicated, and we describe the subtyping rules in terms of variance. What is Invariance? Invariance describes a relationship between two sets of types where the complex types do not subtype at all, despite any subtyping that might exist for the component types. Does that sound confusing?1 Thankfully, it's way more easily demonstrated than defined, so let's look at an example.

## Contravariance

DevFeed: [Contravariance](<https://devfeed.tech/articles/contravariance-25010.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/contravariance/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-11-17T01:58:28Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [generics](<https://devfeed.tech/topics/generics.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Code](<https://devfeed.tech/topics/code.md>), [Java](<https://devfeed.tech/topics/java.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [classes](<https://devfeed.tech/tags/classes.md>), [contravariance](<https://devfeed.tech/tags/contravariance.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generics](<https://devfeed.tech/tags/generics.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [types](<https://devfeed.tech/tags/types.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains contravariance as a type relationship in which subtyping proceeds in opposite directions. It uses inheritance and generic classes to show how contravariant type parameters affect subtype relationships, usage, and the ability to return values of the parameter type.

### Source excerpt

Most of the time, subtyping is intuitive. Object-oriented programmers are used to the concept of inheritance, where one class specializes another, and we're familiar with the idea of passing, say, a Dog object where a function expects an Animal. Once you start working with generics, though, there are some fascinating twists that flip our typical understanding of subtyping on its head. What is Contravariance? Contravariance describes a relationship between two sets of types where they subtype in opposite directions.

## Covariance

DevFeed: [Covariance](<https://devfeed.tech/articles/covariance-25011.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/covariance/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-11-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [generics](<https://devfeed.tech/topics/generics.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [classes](<https://devfeed.tech/tags/classes.md>), [contravariance](<https://devfeed.tech/tags/contravariance.md>), [covariance](<https://devfeed.tech/tags/covariance.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generics](<https://devfeed.tech/tags/generics.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [subtype](<https://devfeed.tech/tags/subtype.md>), [superclass](<https://devfeed.tech/tags/superclass.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains covariance in type systems, focusing on how subtype relationships behave with generic types. It uses Kotlin examples to distinguish covariant read-only types from invariant mutable types, shows how to declare covariance with the out annotation, and discusses related constraints involving function arguments, properties, and inheritance.

### Source excerpt

On the surface, subtypes seem straightforward. Most programmers who write object-oriented code are familiar with the concept of inheritance, and how you can pass off a subclass as if it were its superclass. But subtyping rules aren't always as intuitive when you start working with generics. What is Covariance? Covariance describes a relationship between two sets of types where they both subtype in the same direction. For example, for our first set of types, here are two classes, A and B, where B is a subtype of A:

## Reified Type Parameter

DevFeed: [Reified Type Parameter](<https://devfeed.tech/articles/reified-type-parameter-25021.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/reified-type-parameter/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-10-07T03:42:19Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>)

Tags: [cast](<https://devfeed.tech/tags/cast.md>), [class](<https://devfeed.tech/tags/class.md>), [code](<https://devfeed.tech/tags/code.md>), [examples](<https://devfeed.tech/tags/examples.md>), [extension-function](<https://devfeed.tech/tags/extension-function.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [property](<https://devfeed.tech/tags/property.md>), [reification](<https://devfeed.tech/tags/reification.md>), [reified-type-parameter](<https://devfeed.tech/tags/reified-type-parameter.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [types](<https://devfeed.tech/tags/types.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

An explanation of reified type parameters, including how they preserve type information in inline functions, support type checks and casts, and can provide class objects. The article covers single and multiple parameters, extension properties, requirements, alternatives, and code-size considerations.

### Source excerpt

Reified type parameters are type parameters that retain more characteristics of actual types than normal type parameters do. For a gentle introduction to the topic, check out the guide, Getting Real with Reified Type Parameters. Examples Single Parameter inline fun <reified T> Any.isInstanceOf(): Boolean = this is T Here we created an extension function to wrap the more common is operator. Why is this example so magical? Because normally, compiling this is T would result in an error since the type of T is erased.

## Type Parameter Constraint

DevFeed: [Type Parameter Constraint](<https://devfeed.tech/articles/type-parameter-constraint-25025.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/type-parameter-constraint/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-09-30T01:54:04Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [classes](<https://devfeed.tech/tags/classes.md>), [examples](<https://devfeed.tech/tags/examples.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [property](<https://devfeed.tech/tags/property.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [type-parameters](<https://devfeed.tech/tags/type-parameters.md>), [types](<https://devfeed.tech/tags/types.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This Kotlin article explains type parameter constraints: how upper bounds restrict accepted type arguments while preserving type information, how to apply constraints to interfaces, classes, functions, and extension properties, and how to express single or multiple constraints using concise and verbose syntax.

### Source excerpt

Overview Type parameter constraints allow you to limit the types that can be accepted as a type argument to an upper bound, giving you the ability to invoke functions and properties on an object while preserving the type. If that sounds confusing, go check out the guide, When to Use Type Parameter Constraints, which walks through the use cases in more detail. In this article, we're going to look at the variety of ways that you can create a type parameter constraint in Kotlin.

## Linear Regression

DevFeed: [Linear Regression](<https://devfeed.tech/articles/linear-regression-40328.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/08/18/linear-regression/>)

Published: 2013-08-18T17:43:20Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [linear-regression](<https://devfeed.tech/topics/linear-regression.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [conditional-probability](<https://devfeed.tech/tags/conditional-probability.md>), [covariance](<https://devfeed.tech/tags/covariance.md>), [data](<https://devfeed.tech/tags/data.md>), [expectation](<https://devfeed.tech/tags/expectation.md>), [linear-regression](<https://devfeed.tech/tags/linear-regression.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [python](<https://devfeed.tech/tags/python.md>), [regression](<https://devfeed.tech/tags/regression.md>), [statistics](<https://devfeed.tech/tags/statistics.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial introduces linear regression as a basic form of statistical learning. It explains independent and dependent variables, uses a two-variable linear model to predict one variable from another, and describes estimating the model parameters from sample pairs.

### Source excerpt

Machine learning is broadly split into two camps, statistical learning and non-statistical learning. The latter we've started to get a good picture of on this blog; we approached Perceptrons, decision trees, and neural networks from a non-statistical perspective. And generally "statistical" learning is just that, a perspective. Data is phrased in terms of independent and dependent variables, and statistical techniques are leveraged against the data. In this post we'll focus on the simplest example of this, linear regression, and in the sequel see it applied to various learning problems.

## Probabilistic Bounds -- A Primer

DevFeed: [Probabilistic Bounds -- A Primer](<https://devfeed.tech/articles/probabilistic-bounds-a-primer-40312.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/04/15/probabilistic-bounds-a-primer/>)

Published: 2013-04-15T11:14:32Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [math](<https://devfeed.tech/topics/math.md>), [Learning](<https://devfeed.tech/topics/learning.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [chebyshev](<https://devfeed.tech/tags/chebyshev.md>), [chernoff](<https://devfeed.tech/tags/chernoff.md>), [chernoff-bound](<https://devfeed.tech/tags/chernoff-bound.md>), [inequality](<https://devfeed.tech/tags/inequality.md>), [learning-theory](<https://devfeed.tech/tags/learning-theory.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [markov](<https://devfeed.tech/tags/markov.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [probabilistic](<https://devfeed.tech/tags/probabilistic.md>), [probabilistic-method](<https://devfeed.tech/tags/probabilistic-method.md>), [probability-theory](<https://devfeed.tech/tags/probability-theory.md>), [random-variables](<https://devfeed.tech/tags/random-variables.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [streaming-algorithms](<https://devfeed.tech/tags/streaming-algorithms.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial introduces probabilistic bounds used in algorithm analysis, machine learning theory, randomized algorithms, and streaming algorithms. It focuses on the Chernoff bound and presents simpler bounds from Markov's and Chebyshev's inequalities, including short proofs.

### Source excerpt

Probabilistic arguments are a key tool for the analysis of algorithms in machine learning theory and probability theory. They also assume a prominent role in the analysis of randomized and streaming algorithms, where one imposes a restriction on the amount of storage space an algorithm is allowed to use for its computations (usually sublinear in the size of the input). While a whole host of probabilistic arguments are used, one theorem in particular (or family of theorems) is ubiquitous: the Chernoff bound.

## Probability Theory -- A Primer

DevFeed: [Probability Theory -- A Primer](<https://devfeed.tech/articles/probability-theory-a-primer-40298.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/01/04/probability-theory-a-primer/>)

Published: 2013-01-04T13:45:54Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [math](<https://devfeed.tech/topics/math.md>), [Statistics](<https://devfeed.tech/topics/statistics.md>), [Machine Learning & Artificial Intelligence](<https://devfeed.tech/topics/machine-learning-artificial-intelligence.md>)

Tags: [expectation](<https://devfeed.tech/tags/expectation.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [primer](<https://devfeed.tech/tags/primer.md>), [probabilistic](<https://devfeed.tech/tags/probabilistic.md>), [probability-theory](<https://devfeed.tech/tags/probability-theory.md>), [random-variables](<https://devfeed.tech/tags/random-variables.md>), [set-theory](<https://devfeed.tech/tags/set-theory.md>), [statistics](<https://devfeed.tech/tags/statistics.md>), [theory](<https://devfeed.tech/tags/theory.md>), [variables](<https://devfeed.tech/tags/variables.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

A primer on finite probability theory that introduces probability spaces, random variables, terminology, and basic results using naive set theory. It emphasizes mathematical formalism rather than real-world applications.

### Source excerpt

It is a wonder that we have yet to officially write about probability theory on this blog. Probability theory underlies a huge portion of artificial intelligence, machine learning, and statistics, and a number of our future posts will rely on the ideas and terminology we lay out in this post. Our first formal theory of machine learning will be deeply ingrained in probability theory, we will derive and analyze probabilistic learning algorithms, and our entire treatment of mathematical finance will be framed in terms of random variables.