임계 영역을 위한 표본 크기
작은 데이터셋과 큰 데이터셋의 무작위화 분포를 사용해 유의성에 대한 서로 다른 임계값을 계산하세요. 특히 승진률의 큰 양의 차이에 관심이 있으므로 0.90, 0.95, 0.99의 상위 분위수를 계산합니다.
이 분위수를 계산하는 함수 calc_upper_quantiles()가 스크립트에 제공되어 있습니다.
이 연습은 강의의 일부입니다
R에서의 추론 기초
연습 안내
- 기준점으로, 1000개의 순열 차이로 구성된 원본 데이터셋
disc_perm에 대해calc_upper_quantiles()를 호출해 관련 분위수를 계산하세요. - 작은 데이터셋
disc_perm_small에 대해서도 같은 작업을 하세요 … - 그리고 큰 데이터셋
disc_perm_big에 대해서도 수행하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
calc_upper_quantiles <- function(dataset) {
dataset %>%
summarize(
q.90 = quantile(stat, p = 0.90),
q.95 = quantile(stat, p = 0.95),
q.99 = quantile(stat, p = 0.99)
)
}
# Recall the quantiles associated with the original dataset
calc_upper_quantiles(disc_perm)
# Calculate the quantiles associated with the small dataset
___
# Calculate the quantiles associated with the big dataset
___