C - Nimas Kholilla - Tugas Rutin 3

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Nama : Nimas Kholilla

Kelas : Gizi C
NIM : 5202640001

6.9. Given the normally distributed variable X with mean 18 and standard deviation 2.5,
find:
a. P(X < 15);
b. the value of k such that P(X < k) = 0.2236;
c. the value of k such that P(X> k) = 0.1814;
d. P(17 < X < 21)
Jawaban:
x = 15
μ = 18
σ = 2.5
x−μ 15−18
a. z= σ = 2.5 =−1.2
P(X<15) = P(Z< -1.2) = 0.1151

(
b. P Z<
K −μ
σ )
= 0.2236

P(Z < -0.76) = 0.2236

Maka;
K−μ
= -0.76
σ
k = -0.76 . σ + μ
k = -0.76 . 2.5 + 18
k = 16.1

c. P( K−μ
σ
>
σ )
K−μ
=0.1814

1- P( Z ≤
σ )
K −μ
= 0.1814

P( Z ≤
σ )
K −μ
= 1  0.1814

P( Z ≤
σ )
K −μ
= 0.8186

P(Z≤ 0.91) = 0.8186

Maka;
K−μ
=0.91
σ
k =0.91 . σ + μ
k = 0.91 . 2.5 + 18k = 20.275

x1− μ 17−18
d. z 1= = =−0.4
σ 2.5
x2− μ 21−18
z 2= = =1.2
σ 2.5

Maka;
P(17 < X < 21) = P(-0.4 < Z < 1.2)
= P(Z < 1.2) – P (Z < -0.4)
= 0.8849 – 0.3446
= 0.5403

6.12. The loaves of rye bread distributed to local stores by a certain bakery have an
average length of 30 centimeters and a standard deviation of 2 centimeters.
Assuming that the lengths are normally distributed, what percentage of the loaves are
a. longer than 31.7 centimeters?
b. between 29.3 and 33.5 centimeters in length?
c. shorter than 25.5 centimeters?
Jawaban:
μ = 30
σ=2

a. P(X > 31.7)

(
= P Z>
X−μ
σ ) (
=¿ P Z>
31.7−30
2 )
= P(Z > 0.85)
= 1 – P(Z < 0.85)
= 1 – 0.8023
= 0.1977
= 19.77%

b. P(29.3 < X < 33.5) = P ( 29.3−30


2
< Z<
33.5−30
2 )
= P(-3.5 < Z < 1.75)
= P(Z < 1.75)  P(Z < 3.5)
= 0.9599 – 0.3632
= 0.5967
= 59.67%

(
c. P(X < 25.5) = P Z<
25.5−30
2 )
= P(Z < -2.25)
= 0.0122
= 1.22%

6.13. A research scientist reports that mice will live an average of 40 months when their
diets are sharply re stricted and then enriched with vitamins and proteins. Assuming
that the lifetimes of such mice are normally distributed with a standard deviation of
6.3 months, find the probability that a given mouse will live
a. more than 32 months;
b. less than 28 months;
c. between 37 and 49 months.
Jawaban:
μ = 40
σ = 6.3

(
a. P(X > 32) = P Z>
32−40
6.3)
= P(Z > -1.27)
= 1 – P(Z < 1.27)
= 1  0.1020
= 0.8980

(
b. P(X < 28) = P Z<
28−40
6.3 )
= P(Z < -1.90)
= 1  P(Z < 1.90)
= 1  0.9713
= 0.0287

c. P(37 < X < 49) = P ( 37−40


6.3
<Z <
6.3 )
49−40

= P(-0.48 < Z < 1.43)


= P(Z < 1.43)  P(Z < 0.48)
= 0.9236 – 0.3156
= 0.6080

Kelompok 2: Membuat Koding Phyton


Kita membangkit sampel normal berukuran 100 dengan mean = 10 dan simpangan baku 2
Kemudian tampilkan:
1. Distribusi Sampling Mean
2. Distribusi Sampling Variansi
Jawaban:
https://colab.research.google.com/drive/15sYSteOOJlTmAkJBcj5Idm2tZHRhqlei?
usp=sharing
Distribusi Sampling Mean
import numpy as np
import seaborn as sns
samples = np.zeros(100000)
mu,sigma = 10, 2
for s in range (100000):
    sample = np.random.normal(mu, sigma, 100) # Ukuran Sampel 100
    x_bar = sample.mean ()                    # Menghitung mean sampel (rataan sampel)
    samples[s]=x_bar
sns.distplot(samples, hist = True, color = 'purple',
             hist_kws={'edgecolor':'black'}). set (xlabel = 'Rataan Sampel',
                                            ylabel = 'Kepadatan Peluang')

Distribusi Sampling Variansi


import numpy as np
import seaborn as sns
samples = np.zeros (100000)
mu, sigma = 10, 2
for s in range(100000):
    sample = np.random.normal(mu, sigma, 100) # Ukuran Sampel 100
    ragam_topi = np.var(sample)               # Menghitung Variansi Sampel
    samples[s]= ragam_topi
sns.distplot(samples, hist = True, color = 'purple',
             hist_kws={'edgecolor':'black'}). set(xlabel = 'Variansi Sampel',
                                            ylabel = 'Kepadatan Peluang')

You might also like