Zum Hauptinhalt springen

Documentation Index

Fetch the complete documentation index at: https://kstats.oremif.org/llms.txt

Use this file to discover all available pages before exploring further.

Beginnen Sie mit dem durchgängigen Szenario unten, oder springen Sie direkt zu den modulspezifischen Beispielen am Ende der Seite.

Durchgängiges Szenario

Stichprobe definieren

val sample = doubleArrayOf(2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0)

Zusammenfassen

val stats = sample.describe()
stats.mean              // 5.0
stats.median            // 4.5
stats.standardDeviation // 2.1380
stats.skewness          // 0.6563
stats.interquartileRange // 1.5
describe() liefert Anzahl, Lagemaße, Streuungsmaße, Quartile, Formkennzahlen und Standardfehler in einem einzigen Objekt.

Normalität prüfen

val normality = shapiroWilkTest(sample)
normality.statistic          // W statistic
normality.pValue             // > 0.05 → no evidence against normality
normality.isSignificant()    // false

Verteilung anpassen

val normal = NormalDistribution(mu = stats.mean, sigma = stats.standardDeviation)
normal.cdf(6.0)          // probability that X ≤ 6.0
normal.quantile(0.95)    // value below which 95% of the distribution falls

Hypothese testen

val result = tTest(sample, mu = 5.0)
result.statistic         // 0.0
result.pValue            // 1.0
result.isSignificant()   // false — cannot reject H₀: μ = 5.0
result.confidenceInterval // (3.21, 6.79)

Zusammenhang messen

val x = doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0)
val y = doubleArrayOf(2.1, 3.9, 6.2, 7.8, 10.1)

val r = pearsonCorrelation(x, y)
r.coefficient            // 0.9987
r.pValue                 // 0.0001

val model = simpleLinearRegression(x, y)
model.slope              // 1.99
model.rSquared           // 0.9973
model.predict(6.0)       // 11.99

Modulspezifische Beispiele

val data = doubleArrayOf(2.0, 4.0, 4.0, 5.0, 7.0, 9.0)
data.mean()               // 5.1667
data.median()             // 4.5
data.standardDeviation()  // 2.4833
val summary = data.describe()
summary.skewness          // 0.3942

Nächste Schritte

Deskriptive Statistik

Vollständige Anleitung zu Zusammenfassungen, Momenten, Quantilen und Streaming-Statistiken.

Hypothesentests

Den richtigen Test auswählen und TestResult interpretieren.

A/B Testing

Durchgängiges Beispiel mit Zusammenfassungen, Voraussetzungsprüfungen und Gruppenvergleich.
Last modified on April 18, 2026