Stichprobenfehler

Contents

Stichprobenfehler

Berechnen Sie aus der gegebenen Grundgesamtheit \(pop\):

pop = [4, 10, 10, 17, 5, 1, 11, 3, 15, 8, 10, 2, 11, 10, 15, 5, 0, 14, 1, 12]
  1. den Mittelwert der Grundgesamtheit

  2. den Mittelwert und Stichprobenfehler einer Stichprobe mit Umfang \(n = 10\)


# Frage 1 ...
# Frage 2 ...

Lösungen

import numpy as np

pop_mean = np.mean(pop)
pop_mean
8.2
import random

random.seed(42)  # for reproducibility
sample = random.sample(pop, 10)
sample_mean = np.mean(sample)
print(f"Stichprobe:        {sample}")
print(f"Stichprobenmittel: {sample_mean}")
print(f"Schätzfehler:      {sample_mean-pop_mean}")
Stichprobe:        [17, 4, 15, 3, 0, 10, 2, 10, 10, 14]
Stichprobenmittel: 8.5
Schätzfehler:      0.3000000000000007