0% found this document useful (0 votes)
14 views21 pages

Computer_Project_NhatQuang_SE1502_DE150066

Uploaded by

hieu nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views21 pages

Computer_Project_NhatQuang_SE1502_DE150066

Uploaded by

hieu nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Chebysev

Mean Độ lệch chuẩn Khoảng 1 Khoảng 2 k(bên trái) k(bên phải)


187 22 143 231 -2 2

k 1.5 2 3 4
% observe 55.56 75 88.89 93.75
Phân Phối chuẩn
Mean Độ lệch chuẩn Khoảng 1 Khoảng 2 k(bên trái) k(bên phải)
40 12 16 64 -2 2

k 1 2 3
% observe 68 95 99.7

Probability
LỆCH COMPLEMENT RULE
A 0.245098 P(A) 0.1071
B 0.25 P(~A) 0.8929
0.004902

Addition Rule P(A) P(B) P(A and B)


2-events 0.2 0.6 0.05
P(A or B) 0.75

Independence P(A) P(B)


2-events 0.2 0.6
P(A and B) 0.12

Mult. Rule P(A1) P(A2/A1) P(A3/A1A2) P(A4/A1-3) P(A5/A1-4)


0.9 0.05 0.07 0.02 0.03
P(A1A2A3) 0.00000189

H[i] - i-th part 1 2 3 4


P(H[i]) 0.25 0.75
P(A|H[i]) 0.99 0.17
0.2475 0.1275 0 0
TOTAL PROB P(A) 0.375
Bayes P(H[i]|A) 0.66 0.34 0 0

N K

Combinator 1

IQR
5 7 9 10 11
Number 16
Q2 15.5
Q1 10.25
Q3 19.5
IQR 9.25
Range -3.625 33.375

Binomial distribution
𝜎^2
18 Number of independent trials Mean 1.8
0.1 Probability of success on each trial 1.62
Number of successes in trials
x 0 1 2 3 4 5 6
Probability of exactly x of 18 trials being successful
P(X=x) 0.150095 0.3001892706 0.2835120889 0.168007 0.07000298 0.0217787 0.005243

Geometric and Negative Binomial Distribution


𝜎^2
18 Number of independent trials Mean 10
0.1 Probability of success on each trial 0.9
Number of successes in trials
x 1 2 3 4 5 6 7
Probability of number of trails until first success
P(X=x) 0.1 0.09 0.081 0.0729 0.06561 0.059049 0.0531441

Negative Binomial Distribution


𝜎^2
x is number of independent trials Mean 6000
0.0005 Probability of success on each trial 11994000
r 3
x 3 4 5 6 7 8 9
Probability of number of trails until r success
P(X=x) 1.25E-10 3.748125E-10 7.492502E-10 1.25E-09 1.8713E-09 2.6184E-09 3.4895E-09

HyperGeometric distribution
6 Number of successes in the population
13 Population size
5 Sample size
Number of successes in the sample
x 0 1 2 3 4 5
1 Probability of a given number of sample successes
P(X=x) 0.016317 0.1631701632 0.4079254079 0.32634 0.08158508 0.004662

MEAN, VARIANCE and Standard deviation


x P(X=x) x.P(x) x-M (x-M)^2 (x-M)^2.P(x)
10 0.08 0.8 -2.5 6.25 0.5
11 0.15 1.65 -1.5 2.25 0.3375
12 0.3 3.6 -0.5 0.25 0.075
13 0.2 2.6 0.5 0.25 0.05
14 0.2 2.8 1.5 2.25 0.45
15 0.07 1.05 2.5 6.25 0.4375
Mean 12.5 Var 1.85
Standard deviation 1.36014705

POISSON.DIST function
𝜎^2
Number of events Mean
4 3 2 1 0
Lamda 2 Expected mean
Predicting the number of events over a specific time
P 0.090224 0.180447044 0.2706705665 0.270671 0.13533528
Sum P 0.947347
-P 0.052653
Từ đó chọn k = 2, so sánh bảng bên dưới

P(A) P(B) P(C) P(A and B) P(A and C) P(C and B) P(A and B and C)
3-events 0.43 0.29 0.3 0.13 0.15 0.07 0.03
P(A or B or C) 0.7

5
1

0 1

13 14 15 16 17 18 18 20 21 37
7 8 9 10 11 12 13 14 15 16

0.0009986708 0.000153 1.884E-05 1.884E-06 1.522E-07 9.866E-09 5.059E-10 2.008E-11 5.949E-13 1.239E-14
2
2
39
17 18

1.62E-16 1E-18
CONTINUOUS UNIFORM RANDOM VARIABLE
a b n
4 6 20

𝜎^2
mean 5 (a+b)/2

𝜎^2'
0.3333333333 (b-a)
0.016666667

Normal Distribution
Standard Normal Random Variable Z ~ N(0,1)
z1 0.8
z2 2.5
P(X>z1) 0.2118553986
P(X<z1) 0.7881446014
P(X<z2) 0.9937903347
P(z1<X<z2) 0.205645733

Standard Normal Random Variable Z ~ N(µ,𝜎^2)


X1 24
X2 37

𝜎^2
µ 34
144
P(X>X1) 0.797671619
P(X<X1) 0.202328381
P(X<X2) 0.5987063257
P(X1<X<X2) 0.3963779447

Standard Normal Approximation to the Binomial Distribution Z ~ B(n,p


X1 151
n 16000000
p 0.00001
P(X<X1) 0.2507958707
P(X>X1) 0.7736871225
Normal Approximation to the Poisson Distribution
X1 950
lamda 1000
P(X<X1) 0.056923149

EXPONENTIAL DISTRIBUTION
X1 0.1
lamda 25

𝜎^2
µ 0.04
0.0016
P(X<X1) 0.9179150014
P(X>X1) 0.0820849986

SAMPLING DISTRIBUTIONS
x 11.77 11.9 11.64 11.84 12.13

𝑋 ̅
n 7

(Xi-𝑋 ̅
𝑋)^2
11.862857143
0.008622449 0.0013795918 0.049665 0.00052244898 0.0713653061
s^2 0.0260571429

𝜎
n 25
10
µ 100

𝜎x
X 95

-2.5 Z=(X-µ)/𝜎x
2
Z
P(x<Z) 0.0062096653

Central Limit Theorem


𝜎
X~{X1,X2,..Xn}
independent µ n
Sample mean [1] 5000 40 16

𝑋 ̅𝟐−𝑋 ̅1
Sample mean [1] 5050 30 25
25
Z -2.143732314
P(X<Z) 0.0160271707
P(X>Z) 0.9839728293

STANDARD ERROR
𝜎 10

𝜎x
n 4
5

METHOD OF MOMENTS
X 5 7 9 2 11
X^2 25 49 81 4 121
n 6
EX 6.1666666667
EX^2 48.166666667

Confidence interval
CI ON µ OF A N(µ, σ2): σ2 KNOWN
Bài toán cho n, µ, 𝜎 α tìm CI two sided

𝜎
n 50 zα/2
4000 -zα/2
µ 69500

=NORM.INV(α/2;µ;𝜎/SQRT(n))
α 0.1

=NORM.INV(1-α/2;µ;𝜎/SQRT(n))
Khoảng dưới 68569.53
Khoảng trên 70430.47

Bài toán cho n, µ, 𝜎 α tìm upper and lower-confident one-sided

𝜎
n 50 zα
4000 -zα
µ 69500

=NORM.INV(1-α;µ;𝜎/SQRT(n))
α 0.1

=NORM.INV(α;µ;𝜎/SQRT(n))
upper-confi 70224.96
lower-confi 68775.04

Bài toán cho 𝜎 α , error E tìm n


α 0.05 zα/2

𝜎
E 5

61.46334 =((zα/2*𝜎)/E)^2
20
n

CI ON µ OF A N(µ, σ2): σ2 UnKNOWN

Bài toán cho n, X ngang, S α tìm CI two sided


n 16 tα/2,n-1

𝑋 ̅
S 3645.94 -tα/2,n-1
60139.7
α 0.05
Khoảng dưới 58196.92 = x ngang + tα/2,n-1 * s / sqrt(n)
Khoảng trên 62082.48 = x ngang - tα/2,n-1 * s / sqrt(n)

Bài toán cho n, X ngang, S α tìm upper and lower-confident one-sided

n 16 tα,n-1

𝑋 ̅
S 3645.94 -tα,n-1
60139.7
α 0.05
upper-confi 61737.58 =x ngang + tα,n-1* s / sqrt(n)
lower-confi 58541.82 =x ngang - tα,n-1* s / sqrt(n)

Bài toán cho n, S, C tìm CI cho 𝜎 ^2 two-sided


CI ON σ2 OF A NORMAL

n 18 X^2(α/2),n-1
S 4.7 X^2(1-α/2),n-1
α 0.01
Khoảng dưới 10.51361 =(n-1)*s^2/(X^2(α/2),n-1)
Khoảng trên 65.91464 =(n-1)*s^2/(X^2(1-α/2),n-1)

Bài toán cho n, S, α tìm upper and lower-confident bound cho 𝜎 ^2 one-s
n 18 Xα,n-1
S 4.7 X(1-α),n-1
α 0.01
upper-confi 148.3514
lower-confi 64.97033

CI FOR p: A LARGE-SAMPLE

Bài toán cho f , n ,α, khi đó Z ~ N(f,sqrt(f(1-f)/n)) tìm CI two-sided

f 0.290402 zα/2
n 1219 -zα/2

𝜎
α 0.05
0.013002
Khoảng dưới 0.264919 =f-zα/2*𝜎
Khoảng trên 0.315885 =f+zα/2*𝜎

Bài toán cho f , n ,α, khi đó Z ~ N(f,sqrt(f(1-f)/n)) tìm upper and lower-confi

f 0.290402 zα
n 1219 -zα

𝜎
α 0.05
0.013002
upper-confi 0.311788 =f+zα*𝜎
lower-confi 0.269016 =f-zα*𝜎
Bài toán cho p ,α, error E tìm n
p 0.35 zα/2 1.644853627
α 0.1
E 0.05
n 246.2045 =(z(α/2)/E)^2*p*(1-p)
upper bound on n 270.5543454095 =(z(α/2)/2E)^2

TEST ON THE μ OF NORMDIST: σ2 KNOWN


two-sided test
Reject abs(Z0) > zα/2

𝜎
n 10 zα/2 1.9599639845
1.5
µ 154.2
α 0.05
X 155
Z0 1.6865480854
phi(z) 0.9541548592
P-value 0.0916902815

one-sied test
Reject Z0 > zα

𝜎
n 10 zα 1.644853627
1.5
µ 154.2
α 0.05
X>µ 155
Z 1.6865480854
phi(z) 0.9541548592
P-value 0.0458451408

X<µ 153 Reject Z0 < -zα


Z -2.529822128 -zα -1.644853627
phi(z) 0.0057060182
P-value 0.0057060182

TEST ON THE μ OF NORMDIST: σ2 UNKNOWN


two-sided test
Reject abs(T0) > Tα/2,n-1

𝜎
n 10 Tα/2,n-1 2.2621571628
1.5
µ 154.2
α 0.05
X 155
T0 1.6865480854

one-sied test
Reject T0 > Tα,n-1

𝜎
n 10 Tα,n-1 1.8331129327
1.5
µ 154.2
α 0.05
X>µ 155
T 1.6865480854

X<µ 153 Reject T0 < -Tα,n-1


T -2.529822128 -Tα,n-1 -1.8331129327
TEST ON THE p: LARGE-SAMPLE

two-sided test
p0 0.2904019688 Reject abs(Z0) > zα/2
n 1219 zα/2 1.9599639845

𝜎
α 0.05
0.0130018193
P 0.31
Z0 1.507329913

one-sied test

p0 0.2904019688 Reject abs(Z0) > zα


n 1219 zα 1.644853627

𝜎
α 0.05
0.0130018193
P > p0 0.31
Z0 1.507329913

P < p0 0.271 Reject Z0 < -zα


Z0 -1.492250304 -zα -1.644853627

TESTS ON THE VARIANCE AND STANDARD DEVIATION OF A NORMAL

two-sided test
n 18 X^2(α/2),n-1 35.718465659
S 4.7 -X^2(α/2),n-1 -35.718465659

𝜎0
α 0.01
2.1 Reject X^2 >X^2(α/2),n-1
X^2 85.154195011 or X^2 < - X^2(α/2),n-1

one-sied test

n 18 X^2(α),n-1 33.408663605
S 4.7 -X^2(α),n-1 -33.408663605

𝜎0
α 0.01 Reject
2.1 lớn hơn X^2 > X^2(α),n-1
X^2 85.154195011 bé hơn X^2 < - X^2(α),n-1

Simple Linear Regression


x 2 4 5 6
y 7 11 13 18
xMean 4.25
yMean 12.25
X-xMean -2.25 -0.25 0.75 1.75
(X-xMean)^2 5.0625 0.0625 0.5625 3.0625
Y-yMean -5.25 -1.25 0.75 5.75
(Y-yMean)^2 27.5625 1.5625 0.5625 33.0625
(Y-yMean)*(X-xMean) 11.8125 0.3125 0.5625 10.0625
Sxx 8.75
Syy 62.75
Sxy 22.75
R-Pearson 0.9708910763 =Sxy/sqrt(Sxx*Syy)
B1 2.6 =Sxy/Sxx
B0 1.2 =yMean-B1*xMean
y=B1x+B0
omial Distribution Z ~ B(n,p)

isson Distribution

BUTION
11.99 11.77

0.0161653061 0.008622

Difference µ 𝜎
Mean [2] -[1] 50 11.6619

3
9
1.644853627
-1.644853627

α/2;µ;𝜎/SQRT(n))
-α/2;µ;𝜎/SQRT(n))

nfident one-sided
1.2815515655
-1.281551566

1-α;µ;𝜎/SQRT(n))
(α;µ;𝜎/SQRT(n))

1.9599639845

2.1314495456
-2.131449546

er-confident one-sided

1.7530503557
-1.753050356

α,n-1* s / sqrt(n)
α,n-1* s / sqrt(n)

35.718465659
5.6972171015
dent bound cho 𝜎 ^2 one-sided
33.408663605
6.4077597777

)) tìm CI two-sided

1.9599639845
-1.959963985

)) tìm upper and lower-confidence one-sided

1.644853627
-1.644853627

tìm n

α/2)/E)^2*p*(1-p)
T0) > Tα/2,n-1
N OF A NORMAL DISTRIBUTION

>X^2(α/2),n-1
< - X^2(α/2),n-1

> X^2(α),n-1
< - X^2(α),n-1

You might also like