> ## 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.

# Quickstart

> Deskriptive Statistiken berechnen, eine Verteilung anpassen, einen Hypothesentest durchführen und Korrelation messen — in fünf Minuten.

{/*---IMPORT org.oremif.kstats.distributions.samples.DocsSamples--*/}

{/*---IMPORT org.oremif.kstats.correlation.samples.DocsSamples--*/}

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

```kotlin theme={"system"}
val sample = doubleArrayOf(2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0)
```

### Zusammenfassen

```kotlin theme={"system"}
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

```kotlin theme={"system"}
val normality = shapiroWilkTest(sample)
normality.statistic          // W statistic
normality.pValue             // > 0.05 → no evidence against normality
normality.isSignificant()    // false
```

### Verteilung anpassen

```kotlin theme={"system"}
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

```kotlin theme={"system"}
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

```kotlin theme={"system"}
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

<Tabs>
  <Tab title="Core">
    ```kotlin theme={"system"}
    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
    ```
  </Tab>

  <Tab title="Verteilungen">
    ```kotlin theme={"system"}
    val normal = NormalDistribution(mu = 0.0, sigma = 1.0)
    normal.pdf(0.0)           // 0.3989
    normal.cdf(1.96)          // 0.9750
    normal.quantile(0.975)    // 1.9600

    val poisson = PoissonDistribution(rate = 3.0)
    poisson.pmf(5)            // 0.1008
    poisson.cdf(5)            // 0.9161
    ```
  </Tab>

  <Tab title="Hypothesentests">
    ```kotlin theme={"system"}
    val sample = doubleArrayOf(5.1, 4.9, 5.3, 5.0, 4.8)
    val result = tTest(sample, mu = 5.0, alternative = Alternative.GREATER)
    result.statistic          // t value
    result.pValue             // one-sided p-value
    result.isSignificant()    // true or false at α = 0.05
    result.confidenceInterval // one-sided CI
    ```
  </Tab>

  <Tab title="Korrelation">
    ```kotlin theme={"system"}
    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)

    pearsonCorrelation(x, y).coefficient  // 0.9987
    simpleLinearRegression(x, y).slope    // 1.99
    ```
  </Tab>

  <Tab title="Sampling">
    ```kotlin theme={"system"}
    val data = doubleArrayOf(3.0, 1.0, 4.0, 1.0, 5.0)
    data.rank()               // [3.0, 1.5, 4.0, 1.5, 5.0]
    data.zScore()             // [-0.16, -1.47, 0.49, -1.47, 1.14]
    data.minMaxNormalize()    // [0.5, 0.0, 0.75, 0.0, 1.0]
    ```
  </Tab>
</Tabs>

## Nächste Schritte

<CardGroup cols={3}>
  <Card title="Deskriptive Statistik" icon="chart-column" href="/de/core/overview">
    Vollständige Anleitung zu Zusammenfassungen, Momenten, Quantilen und Streaming-Statistiken.
  </Card>

  <Card title="Hypothesentests" icon="flask-conical" href="/de/hypothesis/overview">
    Den richtigen Test auswählen und `TestResult` interpretieren.
  </Card>

  <Card title="A/B Testing" icon="git-compare-arrows" href="/de/guides/how-to/ab-testing">
    Durchgängiges Beispiel mit Zusammenfassungen, Voraussetzungsprüfungen und Gruppenvergleich.
  </Card>
</CardGroup>
