Zum Hauptinhalt springen
Jede Verteilung kodiert Annahmen darüber, welche Werte möglich sind und wie wahrscheinlich sie auftreten. Dieser Leitfaden gruppiert Verteilungen nach der Art der modellierten Daten und zeigt, wie Sie die Anpassungsgüte überprüfen.

Entscheidungstabelle

DatentypBeispieldomäneVerteilungKonstruktor
Symmetrische Messungen um einen MittelwertSitzungsdauer von NutzernNormalDistributionNormalDistribution(mu, sigma)
Schwerere Ränder als Normal, kleine StichprobenGeschätzte Mittelwerte mit wenigen BeobachtungenStudentTDistributionStudentTDistribution(degreesOfFreedom)
Positive Wartezeiten oder DauernZeit zwischen Server-FehlernExponentialDistributionExponentialDistribution(rate)
Positive Dauern mit VerschleißmusterLebensdauer von Hardware-KomponentenWeibullDistributionWeibullDistribution(shape, scale)
Rechtsschief verteilte positive WerteAPI-AntwortzeitenLogNormalDistributionLogNormalDistribution(mu, sigma)
Anteile oder Raten in [0, 1]KlickrateBetaDistributionBetaDistribution(alpha, beta)
Ereigniszählungen pro IntervallFehler pro StundePoissonDistributionPoissonDistribution(rate)
Erfolge bei fester Anzahl von VersuchenKonversionen aus SeitenaufrufenBinomialDistributionBinomialDistribution(trials, probability)
Überdispergierte ZählungenSupport-Tickets pro TagNegativeBinomialDistributionNegativeBinomialDistribution(successes, probability)
Starker rechter Rand bei positiven DatenEinkommensverteilung, DateigrößenParetoDistributionParetoDistribution(shape, scale)

Dauern und Wartezeiten

// API response times — often right-skewed with a long tail
val responseTime = LogNormalDistribution(mu = 4.5, sigma = 0.8)

responseTime.mean              // expected average in ms
responseTime.quantile(0.95)    // P95 latency
responseTime.quantile(0.99)    // P99 latency
responseTime.cdf(200.0)        // probability of responding under 200ms

Zählungen und Ereignisse

// Errors per hour on a production server
val errorsPerHour = PoissonDistribution(rate = 3.2)

errorsPerHour.pmf(0)            // probability of zero errors
errorsPerHour.cdf(5)            // probability of at most 5 errors
errorsPerHour.quantileInt(0.99) // error count exceeded only 1% of the time

Anteile und Raten

// Click-through rate estimated from 120 clicks in 4000 impressions
val ctr = BetaDistribution(alpha = 120.0, beta = 3880.0)

ctr.mean            // point estimate of CTR
ctr.quantile(0.025) // lower bound of 95% credible interval
ctr.quantile(0.975) // upper bound
ctr.cdf(0.035)      // probability that true CTR is below 3.5%

Allgemeine symmetrische Verteilungen

// User session duration in minutes (roughly symmetric)
val sessionDuration = NormalDistribution(mu = 12.5, sigma = 3.2)

sessionDuration.cdf(15.0)      // probability of session under 15 min
sessionDuration.quantile(0.95) // 95th percentile

// Small-sample estimate — heavier tails give more conservative intervals
val smallSampleEstimate = StudentTDistribution(degreesOfFreedom = 8.0)
smallSampleEstimate.quantile(0.975) // critical value for 95% CI

Anpassungsgüte überprüfen

Vergleichen Sie nach der Wahl einer Verteilung diese mit den beobachteten Daten mithilfe des Kolmogorov-Smirnov-Tests.
val processingTimesMs = doubleArrayOf(
    45.2, 51.8, 48.1, 52.3, 47.6, 49.9, 53.1, 46.5, 50.7, 48.8,
    51.2, 47.3, 49.1, 52.8, 46.9, 50.3, 48.5, 51.6, 47.8, 49.4
)

// Fit a Normal from sample statistics
val fitted = NormalDistribution(
    mu = processingTimesMs.mean(),
    sigma = processingTimesMs.standardDeviation()
)

val ks = kolmogorovSmirnovTest(processingTimesMs, fitted)
ks.statistic // KS statistic — smaller means better fit
ks.pValue    // high p-value means data does not contradict the distribution
Ein nicht-signifikanter KS-Test beweist nicht, dass die Verteilung korrekt ist — er bedeutet lediglich, dass die Daten dieser Wahl nicht stark widersprechen.
Last modified on March 22, 2026