R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

1. Estimasi Titik dan Standar Deviasi

Data kecepatan unduh dari 25 titik akses WiFi adalah sebagai berikut:

data_wifi <- c(18.2, 21.5, 19.8, 23.1, 17.6, 20.4, 22.9, 16.8, 19.1, 24.3,
               18.7, 21.0, 20.2, 17.9, 23.6, 19.4, 22.1, 18.0, 20.9, 21.7,
               16.5, 19.9, 23.4, 18.3, 21.2)
mean(data_wifi)
## [1] 20.26
sd(data_wifi)
## [1] 2.217732

Berdasarkan 25 data kecepatan unduh WiFi, diperoleh rata-rata kecepatan unduh sebesar 20,26 Mbps dengan standar deviasi sebesar 2,22 Mbps.

2. Interval Kepercayaan 95%

t.test(data_wifi, conf.level = 0.95)
## 
##  One Sample t-test
## 
## data:  data_wifi
## t = 45.677, df = 24, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  19.34457 21.17543
## sample estimates:
## mean of x 
##     20.26

Berdasarkan hasil analisis, Interval kepercayaan 95% untuk rata-rata kecepatan unduh WiFi adalah 19,34–21,18 Mbps, sehingga rata-rata populasi diperkirakan berada dalam rentang tersebut.

3. Perbandingan Interval Kepercayaan

t.test(data_wifi, conf.level = 0.90)
## 
##  One Sample t-test
## 
## data:  data_wifi
## t = 45.677, df = 24, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 90 percent confidence interval:
##  19.50114 21.01886
## sample estimates:
## mean of x 
##     20.26
t.test(data_wifi, conf.level = 0.95)
## 
##  One Sample t-test
## 
## data:  data_wifi
## t = 45.677, df = 24, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  19.34457 21.17543
## sample estimates:
## mean of x 
##     20.26
t.test(data_wifi, conf.level = 0.99)
## 
##  One Sample t-test
## 
## data:  data_wifi
## t = 45.677, df = 24, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 99 percent confidence interval:
##  19.01943 21.50057
## sample estimates:
## mean of x 
##     20.26

Berdasarkan hasil perhitungan, Interval kepercayaan 90% adalah 19,50–21,02 Mbps, 95% adalah 19,34–21,18 Mbps, dan 99% adalah 19,02–21,50 Mbps. Semakin tinggi tingkat kepercayaan, semakin lebar interval, karena diperlukan rentang lebih luas agar estimasi rata-rata populasi lebih meyakinkan.

4. Margin of Error

Margin of error 95% sebesar 0,92 Mbps menunjukkan bahwa rata-rata sampel 20,26 Mbps memiliki batas kesalahan estimasi ±0,92 Mbps. Dengan demikian, rata-rata populasi diperkirakan berada pada rentang 19,34–21,18 Mbps pada tingkat kepercayaan 95%.

5. Pengujian Standar Minimum Kecepatan WiFi

t.test(data_wifi, mu = 20, alternative = "greater")
## 
##  One Sample t-test
## 
## data:  data_wifi
## t = 0.58618, df = 24, p-value = 0.2816
## alternative hypothesis: true mean is greater than 20
## 95 percent confidence interval:
##  19.50114      Inf
## sample estimates:
## mean of x 
##     20.26

Berdasarkan hasil uji t satu sampel dengan hipotesis greater menunjukkan rata-rata sampel kecepatan WiFi kampus sebesar 20,26 Mbps dengan p-value = 0,2816. Karena p-value lebih besar dari 0,05, maka hipotesis nol tidak ditolak, sehingga secara statistik tidak ada bukti cukup bahwa rata-rata kecepatan WiFi kampus lebih tinggi dari standar minimum 20 Mbps. Dalam konteks ini, Galat Tipe I berarti kampus salah menyimpulkan WiFi > 20 Mbps padahal sebenarnya tidak, sedangkan Galat Tipe II berarti kampus gagal menyimpulkan WiFi > 20 Mbps padahal sebenarnya memang lebih tinggi.