Diese Website verwendet Cookies und Targeting Technologien, um Ihnen ein besseres Internet-Erlebnis zu ermöglichen und die Werbung, die Sie sehen, besser an Ihre Bedürfnisse anzupassen. Diese Technologien nutzen wir außerdem, um Ergebnisse zu messen, um zu verstehen, woher unsere Besucher kommen oder um unsere Website weiter zu entwickeln.
The following package(s) will be installed:
- MSBStatsData [0.0.2]
These packages will be installed into "/builds/buecker/buecker.fh-muenster.io/renv/library/linux-ubuntu-noble/R-4.5/x86_64-pc-linux-gnu".
# Installing packages --------------------------------------------------------
- Installing MSBStatsData ... OK [linked from cache]
Successfully installed 1 package in 4.7 milliseconds.
# Erstellen Sie eine Vorhersage für einen Tag # mit 25°C und 0mm Niederschlag!df_icecream_new <-data.frame(Temperatur =c(25),Niederschlag =c(0),Wochentag ="Sonntag")predict(lm_model, newdata = df_icecream_new)
1
5459.68
Vorlesung vom 20.12.2024
Übungsaufgabe 6.4
## Laden der Pakete# install.packages("MSBStatsData")library(MSBStatsData)## Regression berechnenlm_zehnkampf <-lm(longjump ~ race100m, data = decathlon)lm_zehnkampf
## Grafische Darstellungplot(x = decathlon$race100m,y = decathlon$longjump,xlab ="Zeit im 100-Meter-Lauf (in Sekunden)",ylab ="Weite im Weitsprung (in Metern)")abline(lm_zehnkampf, col ="red")
## Bestimmtheitsmaß bzw. R^2summary(lm_zehnkampf)
Call:
lm(formula = longjump ~ race100m, data = decathlon)
Residuals:
Min 1Q Median 3Q Max
-1.02828 -0.18094 0.00203 0.19069 0.92360
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 13.08220 0.12390 105.59 <2e-16 ***
race100m -0.54331 0.01101 -49.35 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.2778 on 7966 degrees of freedom
Multiple R-squared: 0.2342, Adjusted R-squared: 0.2341
F-statistic: 2436 on 1 and 7966 DF, p-value: < 2.2e-16
# X ~ N(1,4)# gesucht: P(0 <= X <= 4) = P(X<=4) - P(X<=0)# = F(4) - F(0)pnorm(4, mean =1, sd =sqrt(4)) -pnorm(0, mean =1, sd =sqrt(4))
[1] 0.6246553
Aufgabe 8.9
1-pnorm(5,0.5,2)
[1] 0.01222447
pnorm(4,0.5,2)-pnorm(-4,0.5,2)
[1] 0.9477164
Aufgabe 8.8
pbinom(1, size =30, prob =0.15)
[1] 0.0480289
Aufgabe aus Vorlesung
pbinom(2,20,0.1)
[1] 0.6769268
1-pbinom(100,900,0.1)
[1] 0.122629
1-pnorm(10/9,0,1)
[1] 0.1332603
Aufgabe 10.1
x <-c(1.95, 1.80, 2.10, 2.82, 1.75, 2.01, 1.83, 1.90)mean(x)
[1] 2.02
Konfidenzintervall
alpha <-0.05qnorm(1-alpha/2)
[1] 1.959964
t.test(x, conf.level=0.95)
One Sample t-test
data: x
t = 16.661, df = 7, p-value = 6.859e-07
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
1.733305 2.306695
sample estimates:
mean of x
2.02
One Sample t-test
data: einkommen
t = 3.4842, df = 9, p-value = 0.006892
alternative hypothesis: true mean is not equal to 0
90 percent confidence interval:
813.1882 2618.8118
sample estimates:
mean of x
1716
Aufgabe 10.7
binom.test(x =290, n =808, conf.level =0.99)
Exact binomial test
data: 290 and 808
number of successes = 290, number of trials = 808, p-value = 9.053e-16
alternative hypothesis: true probability of success is not equal to 0.5
99 percent confidence interval:
0.3157707 0.4037399
sample estimates:
probability of success
0.3589109
Aufgabe 11.4
binom.test(x =1395, n =2000, alternative ="greater")
Exact binomial test
data: 1395 and 2000
number of successes = 1395, number of trials = 2000, p-value < 2.2e-16
alternative hypothesis: true probability of success is greater than 0.5
95 percent confidence interval:
0.6801479 1.0000000
sample estimates:
probability of success
0.6975
# Der p-Wert von 0.5735 ist größer als alpha = 0.05, d.h.# die Nullhypothese kann nicht abgelehnt werden, d.h.# Gewerkschaftszugehörigkeit und Zufriedenheit sind unabhängig