開始使用免費開始

檢定曼哈頓 1 房公寓的租金中位數

把焦點拉回到曼哈頓的公寓。我們想評估這些資料是否提供證據,顯示曼哈頓 1 房公寓的租金中位數高於 $2,500。

本練習屬於課程

R 數值資料推論

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

n_replicates <- 15000

# Generate 15000 bootstrap samples centered at null
rent_med_ht <- manhattan %>%
  specify(response = rent) %>%
  # Use a point hypothesis with a median of 2500
  ___(null = "___", med = ___) %>% 
  generate(reps = n_replicates, type = "bootstrap") %>% 
  calculate(stat = "median")
  
# See the result
rent_med_ht
編輯並執行程式碼