STA1512-Sebaran Penarikan Contoh

Peubah Acak (Random Variable)

Suatu Peubah Acak adalah suatu deskripsi numerik dari hasil suatu percobaan.

Jenis Peubah Acak

1. Peubah Acak Diskrit

Suatu peubah acak diskret mempunyai nilai bilangan bulat, bisa terhingga atau tak hingga. Contoh:

  • X = Banyaknya gempa di suatu daerah dalam 1 minggu

  • Y = Jumlah bilangan yang muncul dari dua dadu dilemparkan

  • Z = Berapa kali munculnya sisi gambar jika sebuah koin dilempar 5 kali

2. Peubah Acak Kontinyu

Suatu peubah acak kontinyu bisa mempunyai nilai berapa saja (termasuk angka desimal) di dalam suatu interval tertentu. Contoh:

  • X = Daya tahan dalam jam suatu tabung radio

  • Y = Lama seseorang menelepon dalam menit

Sebaran Normal

• The shape of the normal curve is often illustrated as a bell-shaped curve.

• The highest point on the normal curve is at the mean of the distribution.

• The normal curve is symmetric.

• The standard deviation determines the width of the curve.

Sebaran Normal Baku (Standard Normal (z) Distribution)

Distribusi normal baku (standar) adalah distribusi peubah acak dengan rata-rata \(\mu=0\) dan varian \(\sigma^{2}=1\). Peubah acak (variabel random) distribusi normal baku dinotasikan dengan \(Z\) yang merupakan hasil transformasi dari peubah acak \(X\) yang berdistribusi normal.

Bentuk transformasi peubah acak tersebut adalah sebagai berikut.

\(Z=\frac{X-\mu}{\sigma}\)

Tabel sebaran normal dapat didownload melalui link berikut: [Click Here]

Fungsi pada R terkait sebaran normal:

  • R function pnorm(q, mean, sd, lower.tail) is the cumulative probability (lower.tail = TRUE for left tail, lower.tail = FALSE for right tail) of less than or equal to value q.

  • R function rnorm(n, mean, sd) returns n random numbers from the normal distribution \(X\)~\(N(\mu, \sigma^{2})\).

  • R function qnorm(p, mean, sd, lower.tail) is the value of x at the qth percentile (lower.tail = TRUE).

Contoh:

Skor IQ (X) memiliki sebaran \(X\)\(N(100,144)\). Berapa peluang seseorang yang dipilih secara acak memiliki :

  1. IQ<90?
mean1 = 100
sd1 = sqrt(144)
x1 = 90

pnorm(q = x1, mean = mean1, sd = sd1, lower.tail = TRUE)
## [1] 0.2023284
  1. IQ>110?
mean1 = 100
sd1 = sqrt(144)
x1 = 110

pnorm(q = x1, mean = mean1, sd = sd1, lower.tail = FALSE)
## [1] 0.2023284

Sebaran Percontohan

Dalam kehidupan nyata, menghitung parameter populasi sangat sulit (sulit ditemukan) karena populasinya sangat besar. Karena menyelidiki seluruh populasi sangat sulit, sehingga dilakukan pengambilan contoh/sampel untuk menghitung statistik yang terkait dengan parameter yang diinginkan, dan membuat kesimpulan.

Sebaran Percontohan suatu statistik (bukan parameter) adalah sebaran nilai yang diambil oleh statistik dalam semua kemungkinan sampel yang berukuran sama dari populasi yang sama.

Sebaran Percontohan dari Satu Rataan Contoh

  1. Rataan dari rataan contoh (\(\mu_{\bar{x}}\))

\(\mu_{\bar{x}}=\mu\)

  1. Ragam dan simpangan baku dari Rataan contoh (\(\sigma_{\bar{x}}\))

\(\sigma_{\bar{x}}^2=\frac{\sigma^2}{n}\)

\(\sigma_{\bar{x}}=\frac{\sigma}{\sqrt{n}}\)

Dalil Limit Pusat (Central Limit Theorem)

Central Limit Theorem: If random samples of n observations are drawn from a nonnormal population with finite μ and standard deviation σ, then, when n is large, the sampling distribution of the sample mean (symbol : \(\bar{x}\)) is approximately normally distributed, with mean μ and standard deviation \(\frac{\sigma}{n}\). The approximation becomes more accurate as n becomes large

  • If the population is normal, then the sampling distribution of will also be normal, no matter what the sample size.

  • When the population is approximately symmetric, the distribution becomes approximately normal for relatively small values of n.

  • When the population is skewed, the sample size must be at least 30 before the sampling distribution of becomes approximately normal.

Ilustrasi:

Contoh:

  1. Andaikan kita memiliki suatu populasi data banyaknya buku yang dipinjam siswa dalam satu semester dengan μ = 8 dan simpangan baku σ = 3. Sebuah contoh acak n = 36 diambil dari populasi tersebut. Berapa peluang rata-rata contoh yang diperoleh berada pada rentang 7.8 and 8.2?
xbar1=7.8
xbar2=8.2
sd1=3/sqrt(36)
miu=8

peluang<-pnorm(q = xbar2, mean = miu, sd = sd1, lower.tail = TRUE)-pnorm(q = xbar1, mean = miu, sd = sd1, lower.tail = TRUE)
peluang #untuk memanggil hasil
## [1] 0.3108435
  1. A soda filling machine is supposed to fill cans of soda with 12 fluid ounces. Suppose that the fills are actually normally distributed with a mean of 12.1 oz and a standard deviation of 0.2 oz. What is the probability that the average fill for a 6-pack of soda is less than 12 oz (the probability of \(\bar{x}<12\))?

Answer:

xbar2=12
sd2=0.2/sqrt(6)
miu2=12.1
peluang<-pnorm(q = xbar2, mean = miu2, sd = sd2, lower.tail = TRUE)
peluang
## [1] 0.1103357

Sebaran Percontohan dari Satu Proporsi Contoh

Proporsi adalah fraksi antara banyaknya kejadian tertentu dibagi dengan banyaknya amatan.

  1. Rataan dari proporsi contoh

\(E(\hat{p})=p\)

  1. Ragam dan simpangan baku dari proporsi contoh

\(V(\hat{p})=\sigma_{\hat{p}}^2=\frac{p(1-p)}{n}\)

\(\sigma_{\hat{p}}=\sqrt{\frac{p(1-p)}{n}}\)

Contoh:

Jika populasi yang sesungguhnya dari pendukung pasangan A adalah p = 0.4, dan dari populasi dilakukan survei dengan mengambil contoh 200 orang, berapa peluang survei menghasilkan proporsi antara antara 0.5 dan 0.6?

p1=0.5
p2=0.6
n=200

peluang<-pnorm(p2, 0.4, sd=sqrt(0.4*0.6/200),lower.tail = TRUE)-
pnorm(p1, 0.4, sd=sqrt(0.4*0.6/200),lower.tail = TRUE)

peluang
## [1] 0.001946205

Excercise

  1. A consumer investigator is interested in the differences in the selling prices of a new popular compact automobile at various dealers in a 100 mile radius of Houston, Texas. She asks for a quote from 25 dealers for this car with exactly the same options. The selling prices (in 1,000 USD) are given here.

- Determine the mean, median, mode, lower and upper quartiles, variance, and range of the selling price.

- Construct a box plot for these data. Is there outlier in the data?
  1. Let y be a normal random variable with \(\mu=500\) and \(\sigma^{2}=100\) . Find the following probabilities:
  • P(500<y<665)

  • P(y>665)

  • P(y<500)

  1. The soda bottler in the previous example claims that only 5% of the soda cans are underfilled. A quality control technician randomly samples 200 cans of soda. What is the probability that more than 10% of the cans are underfilled?

Submission link: https://ipb.link/tugas-sta1512