Вы находитесь на странице: 1из 5

Meidiana Nurul Islami

17/411863/EK/21513

Manajemen

Problem Set 10 Statistika 2

Gunawan, M.Sc.

Due: 23 May 2019

1. (Basic Probability) Suppose T tv=15, compute:

(a)

P(T ≤ −0.35)

R-code

: > pt(-0.35,15)

Solution

: [1] 0.3656023

(b)

P(−0.15 ≤ T ≤ 1.3)

R-code

: > pt(1.3,15) - pt(-0.15,15)

Solution

: [1] 0.4520069

(c)

P(T ≥ −1.5)

R-code

: > 1-pt(-1.5,15)

Solution

: [1] 0.9228167

(d)

t s.t. P(T ≥ t) = 0.97

R-code

: > -qt(0.97,15)

Solution

: [1] -2.034289

(e)

t s.t. P(T ≤ t) = 0.98

R-code

: > qt(0.98,15)

Solution

: [1] 2.24854

(f) t s.t. P(−t ≤ T ≤ t) = 0.99

R-code

: > qt(0.995,15)

Solution

: [1] 2.946713

(g) Simulate an iid random sample Ti tv=15, with i = 1,

,

n and n = 100.

> set.seed(1)

> sample1=rt(100,df=15)

> sample1

> set.seed(1) > sample1=rt(100,df=15) > sample1 (h) Plot the histogram of the data from (g) with

(h) Plot the histogram of the data from (g) with a density overlay!

> hist(sample2, prob=TRUE)

> lines(density(sample2))

the histogram of the data from (g) with a density overlay! > hist(sample2, prob=TRUE) > lines(density(sample2))

2.

(The Law of Large Numbers) Suppose we conduct an experiment of rolling a fair six-faced

die repeatedly a thousand times.

a) Make a plot of the average of the thrown numbers cumulatively from the first up until the last roll!

R-code

: > set.seed(555)

>rolling=sample(c(1:6),size=1000,replace=TRUE)

>plot(cumsum(rolling)/(1:length(rolling)),type="l",ylim=range(1:6),

main="Lempar Dadu",xlab="Jumlah Pelemparan",ylab="Rata-rata Pelemparan")

> abline(h=3.5,col="red")

Pelemparan") > abline(h=3.5,col="red") b) What do you conclude? Kesimpulannya, semakin banyak

b) What do you conclude? Kesimpulannya, semakin banyak percobaan atau pelemparan dadu yang dilakukan, maka rata-rata pelemparan hasilnya akan semakin konvergen (mendekati) nilai mean, yaitu 3.5.

3. (The Central Limit Theorem) Suppose we are interested in showing empirically, that when

we infinitely take successive random samples from a population, increasing the sample size will cause the sampling distribution of the sample mean to converge to the normal distribution, irrespective of the shape of the population distribution. Assume we now draw a thousand random samples from the exponential distribution Exp(λ = 8) for each the sample size N1 = 5, N2 = 10, and N3 = 50.

a) Compute the sample means of the one thousand samples for each different sample size, and save them as three different variables!

sample size, and save them as three different variables! b) Show the histogram of the three

b) Show the histogram of the three variables above! Hint: Please adjust the xlim so that your plots show the results properly!

the histogram of the three variables above! Hint: Please adjust the xlim so that your plots

c) Show the QQ-plot of the three variables above to make a better comparison between the empirical and the theoretical normal distribution!

the empirical and the theoretical normal distribution! d) What do you conclude from b) and c)?
the empirical and the theoretical normal distribution! d) What do you conclude from b) and c)?

d) What do you conclude from b) and c)? Kesimpulannya, berdasarkan Central Limit Theory, semakin besar sample size nya maka akan semakin mendekati distribusi normal. Perhitungan (b) dan (c), sample mean dari setiap variabel yang berbeda (5, 10, 50) memiliki distribusi normal. Hal itu karena besaran sample (sample size=1000) ketiganya sama, sehingga memiliki distribusi normal yang serupa.