library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.2.0
## ✔ forcats 1.0.1 ✔ stringr 1.6.0
## ✔ ggplot2 4.0.1 ✔ tibble 3.3.0
## ✔ lubridate 1.9.5 ✔ tidyr 1.3.2
## ✔ purrr 1.2.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(dplyr)
library(lsr)
set.seed(456)
boy_verisi <- data_frame(id = 1:43)
## Warning: `data_frame()` was deprecated in tibble 1.1.0.
## ℹ Please use `tibble()` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
boy_verisi <- mutate(boy_verisi, boy = round(rnorm(n(), 108.5, 1)))
head(boy_verisi)
## # A tibble: 6 × 2
## id boy
## <int> <dbl>
## 1 1 107
## 2 2 109
## 3 3 109
## 4 4 107
## 5 5 108
## 6 6 108
shapiro.test(boy_verisi$boy)
##
## Shapiro-Wilk normality test
##
## data: boy_verisi$boy
## W = 0.90037, p-value = 0.001283
oneSampleTTest(boy_verisi$boy, mu=110)
##
## One sample t-test
##
## Data variable: boy_verisi$boy
##
## Descriptive statistics:
## boy
## mean 108.581
## std dev. 1.074
##
## Hypotheses:
## null: population mean equals 110
## alternative: population mean not equal to 110
##
## Test results:
## t-statistic: -8.66
## degrees of freedom: 42
## p-value: <.001
##
## Other information:
## two-sided 95% confidence interval: [108.251, 108.912]
## estimated effect size (Cohen's d): 1.321