library(tidyverse)
## Warning: package 'ggplot2' was built under R version 4.5.2
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.1     ✔ stringr   1.5.2
## ✔ ggplot2   4.0.1     ✔ tibble    3.3.0
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.1
## ✔ purrr     1.1.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)
## Warning: package 'lsr' was built under R version 4.5.2

Tek Örneklem T Testi

set.seed(123)
boy_verisi<- data.frame(id=1:43)%>% mutate(boy=round(rnorm(n(),108.5),1))
head(boy_verisi) # ilk satırları görüntüleyelim
##   id   boy
## 1  1 107.9
## 2  2 108.3
## 3  3 110.1
## 4  4 108.6
## 5  5 108.6
## 6  6 110.2
shapiro.test(boy_verisi$boy) # normallik testi
## 
##  Shapiro-Wilk normality test
## 
## data:  boy_verisi$boy
## W = 0.98805, p-value = 0.9289
oneSampleTTest(boy_verisi$boy, mu=110)
## 
##    One sample t-test 
## 
## Data variable:   boy_verisi$boy 
## 
## Descriptive statistics: 
##                 boy
##    mean     108.493
##    std dev.   0.903
## 
## Hypotheses: 
##    null:        population mean equals 110 
##    alternative: population mean not equal to 110 
## 
## Test results: 
##    t-statistic:  -10.946 
##    degrees of freedom:  42 
##    p-value:  <.001 
## 
## Other information: 
##    two-sided 95% confidence interval:  [108.215, 108.771] 
##    estimated effect size (Cohen's d):  1.669

Analiz sonucunda, çocukların boy ortalamasının 110 cm olan referans değerden anlamlı düzeyde düşük olduğu görülmüştür (t(42)) = -10.95, p< .001, %95 GA [108.21,108.77]). Test sonucu hesaplanan etki büyüklüğü d= 1.669 farkın çok büyük olduğunu göstermektedir. Bu durumda çocukların boy ortalaması (x= 100cm), bu yaş grubu çocuklar için belirlenen norm değerden (110 cm) düşük olduğu için, çocukların boy gelişimi açısından akranlarının gerisinde kaldığı söylenebilir.