Sei sulla pagina 1di 15

Business Statistic Lab 1

Instructor: Anantanat Kantanyarat, Ph. D.

Team Members:

1. Nattana
2. Sunnada Vanaphongsai 5343346026
3. Karitha Sukhumvat 5343362326
4. Sasirin Tanopajaisit 5343331526
5. Sahatbordee Chen 5343340126
6. Pawitra Chairattanasongporn 5343359126
Part 1

Random number generation (random seed =636)

15.3227 19.2667 15.6176 17.8731


3 9 16.88528 9 17.33833 7 18.32713 15.8463
19.7691 18.0736 19.6987 17.2566
3 7 16.11621 8 18.58211 9 15.1091 17.8695
16.1250 16.9093 18.5993
6 16.9039 18.64513 9 16.9921 5 16.26606 19.1369
15.2168 16.1508 17.4713 19.0095
3 5 19.67788 9 19.38505 2 17.79733 19.6779
16.4302 16.1523 17.3555
5 8 17.71233 7 18.45225 18.5963 19.82376 17.7815
15.1139 19.9841 18.4206 16.7006
9 3 16.15909 7 17.34962 4 17.89666 16.0712
19.3765 16.6730
15.6064 1 15.58748 2 19.91272 16.2508 19.93149 15.7035
18.7589 16.2422
19.8883 6 16.59703 18.6549 16.49525 6 18.76583 18.6927
16.8594 17.4268 15.9550 17.3433
9 3 18.31278 8 15.43611 6 15.34349 18.3595
19.8350 17.8466 15.6259
17.2425 5 17.50694 1 15.14756 3 17.52327 17.9057
19.0156 17.0474 19.4210
19.1084 3 18.34529 9 16.8302 6 19.51155 17.1137
19.0302 18.1206 19.2986
7 7 17.75765 18.6082 17.81365 8 16.92206 17.1697
18.8599 15.0906 16.9228 16.1738
8 4 16.43422 2 15.52065 9 17.45888 18.6142
18.1305 15.4477 15.8661 17.5373
9 1 15.44664 2 17.05756 1 17.2251 17.4146
17.0839 18.2123 17.0554 16.8097
6 8 18.49422 2 19.42824 5 17.65664 19.1667
15.3225 19.9475 16.2364 15.8236
8 1 19.77477 6 15.37477 9 18.08023 16.4162
16.0878 16.9260 17.7965 15.4284
3 2 17.481 6 19.84222 8 18.89798 19.1107
16.1610 15.4243 17.3998
8 6 17.92138 2 17.06763 19.2204 15.3946 18.171
15.1393 17.7498 15.3981
16.3921 2 15.26627 7 18.2963 1 17.17307 17.1934
17.8510 15.7322 17.4759 16.7441
4 9 16.91946 7 15.11994 3 18.21085 17.271
sum
341.602 350.985 346.761 345.353
5 6 347.0411 8 347.4422 6 353.3151 354.686
mean
17.0801 17.5492 17.3380 17.2676
3 8 17.35205 9 17.37211 8 17.66575 17.7343
Remark: (This is just an example of the random number generated. You can see the rest of
these numbers by going to the excel file ‘stat part 1’ under “data”)

Plot 1
Frequenc
Bin y

Histogram of the first sample


6
4
Frequency

2
Frequency
0
15 5.5 16 6.5 17 7.5 18 8.5 19 9.5 20 0.5 ore
1 1 1 1 1 2 M

Bin

15 0

15.5 4
16 1
16.5 5
17 1
17.5 2
18 1
18.5 1
19 1
19.5 2
20 2
20.5 0
More 0
Parameter:
Mean=17.08013
Standard deviation=1.435

Distribution:
The graph has a bimodal distribution. However, it may not look like that distribution because the
sample size is n=20 which is small. However if the sample size is larger you will be able to see the
distribution shape more clearly.

Plot 2 Frequenc
Bin y
15 0
His
og
t
a
r
m o
f
all
24
00
nu
mb
er
s

15.5 233
Parameter:
16 250
Mean: 17.4984443189795
16.5 249
Stand Deviation: 1.43581602701971
17 213
Distribution: It has a uniform distribution. This is because n is larger than17.5 plot 1 so plot247
2
looks more like a uniform distribution. 18 239
18.5 259
19 251
Plot 3 19.5 226
Bin Frequency20 233
16.5 20.50 0
16.6 0
More 0
Histogram of the means of 120 samples 16.7 1
16.8 1
20 16.9 0
17 3
16
17.1 4
12 17.2 5
Frequency

8 17.3Frequency 15
17.4 18
4
17.5 13
0 17.6 13
.5 .7 .9 .1 .3 .5 .7 .9 .1 r e 17.7 18
16 16 16 17 17 17 17 17 18 Mo
17.8 12
Bin 17.9 8
18 5
18.1 2
18.2 2
More 0
Frequenc
Bin y
333 0
335 1
337 1
339 2
341 1
343 5
Parameter: 345 12
Mean=17.49844 Standard deviation= 0.280646 n=120 347 12
349 19
351
Distribution: This histogram shows that it is normally distributed. This is a histogram of a 14
353
sample mean so it looks different from the others because the means from each sample are very 15
355
close in value. Therefore the standard deviation is very small compared to the others. 18
357 9
Standard error: 0.322748612183951 359 5
=√((b-a)^2/12) 361 3
363
The standard error, by definition, is the approximation of the standard deviation. 2
Therefore, the value of the standard error should be close to the value of the 365 1
stand deviation.
More 0
The standard deviation for plot 3 is 0.280646; 0ur calculated standard error, 0.322749, is a close
estimate.

Plot 4
Histogram of the sum of120 samples

20
15
Frequency

10
5 Frequency
0
3 7 1 5 9 3 7 1 5
33 33 34 34 34 35 35 36 36
Bin
Parameter:
Mean=349.9689
Standard deviation=5.612928

Distribution: This histogram approximate normal distribution

Standard error: 6.45497224367903


=σ/√n
The standard error , by definition, is the approximation of the standard deviation.
Therefore, the value of the standard error should be close to the value of the stand deviation.
The standard deviation for plot 4 is6.512928; 0ur calculated standard error, 6.454972, is a
close estimate.

Hypothesis testing:
Countif 459 . This is the number of values out of 2400 generated that are greater than 19.

There is a 19.125% probability that an observation is greater than 19.

H0 : p=0.2 HA : p≠ 0.2
At 1% significant level. α = 0.01
p 0= 0.2
p= 0.2
n= 20
p^= 0.19125
-
Z cal= 1.25285

SD(p^)= 0.0879413

p-value= 2P(Z ≥ | -1.25285 | )


= 0.2112

P-value > α; 0.2112 > 0.01 Therefore, we do not reject H0.

Critical values = -2.575, 2.575 Z cal falls in the acceptance region; we do not reject H0

Conclusion:
Therefore, there is no significant evidence to infer that the proportion of the observation
greater than 19 is not equal to 0.2 at 1% significance level. Yes, based on the test's
conclusion, we could say that the computer is really making uniformly distributed numbers,
because there is a 20% probability that an observation is greater than 19.

Part Two

36.3189
33.617 52.8821131 42.65083 2 44.39146 46.41137 48.20488 37.82167 51.18825
42.8058 63.2734
1 36.95966893 54.53609 8 50.91494 38.28682 36.94845 52.17651 44.96414
54.6073 51.4169
3 46.66861298 44.63008 3 49.3691 37.13978 41.74792 54.3911 51.26194
53.0873 43.8523
8 59.32024419 42.69358 7 42.46754 54.30007 60.13135 44.39837 34.44752
30.0065 65.46963345 39.50347 48.5946 44.43404 41.90916 46.5014 39.06154 32.40007
7 7
56.4687 52.5967
1 44.89012736 41.34666 8 43.19229 43.19171 43.67206 46.44466 34.58469
48.3032 57.9447
1 41.03199967 48.67532 5 45.91999 55.8022 51.18181 42.07394 39.22111
52.4478 37.4003
2 29.69784259 41.57561 4 35.14506 45.07832 45.27517 45.11561 49.77258
43.2837
51.9134 51.39627444 48.27984 2 42.43227 53.97235 54.71122 43.53839 50.29438
40.0981 56.8749
5 44.48466609 38.27739 8 46.0114 52.83046 49.28711 54.98288 40.83193
44.5335 47.0478
4 58.33328328 61.66231 8 49.06933 54.36852 40.59345 46.55471 54.65443
43.3378 37.5050
6 32.49552788 38.44379 6 55.71234 45.81834 48.71159 44.79315 35.60513

Remark: (This is just an example of the random number generated. You can see the rest of
these numbers by going to the excel file ‘stat part 2’ under sheet“data”)

Frequenc
Plot 5 Bin y
21 0
23 2
25 3
27 8
Parameter: 29 9
Mean: 45 31 28
Standard deviation: 7.5 33 39
Degree of freedom: 1800-1=1799
35 63
37 87
39 131
The distribution: The distribution of the histogram is approximately bell-
41 153
shaped.
43 162
45 201
47 182
49 203
51 162
53 120
55 92
57 48
59 49
61 26
63 12
65 9
67 8
69 2
71 0
73 1
More 0
Frequenc
Plot 6 Bin y
39 0
Histogram of the sample means 40 1
40 41 1
30 42 6
20
Frequency

10 Frequency
0 43 14
e 44 29
39 41 43 45 47 49 51 or
M 45 26
46 20
Bin
47 23
48 15
49 11
50 3
51 1
52 0
More 0

Parameter:
Mean: 45.1231
Standard deviation: 2.08082
Degree of freedom: 12-1=11

The distribution: It is normally distributed

Given:
σ= 7.5
n= 12
2.16506
se= 4
The standard error: 2.165064
=σ/√n

By definition, is the approximation of the standard deviation.

Therefore, the value of the standard error should be close to the value of the stand deviation.

The standard deviation for plot 6 is 2.08082; 0ur calculated standard error, 2.165064, is a
close estimate.

Plot 7
Histogram of the sample sums Frequenc
25 Bin y
20 470 0
15 480 1
490 0
Frequency

10
500
Frequency 4
5
510 9
0
520 17
530 23
e
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
M 0
or
47
48

50
51
52

54
55

57
58
59

61
62
49

53

56

60

Bin 540 23
550 17
560 23
570 11
580 12
590 6
600 3
610 1
620 0
More 0

Parameter:
Mean: 541.477
Standard deviation: 24.9698

The distribution: It is normally distributed

Given:
σ= 7.5
n= 12
25.9807
se= 6

The standard error: 25.98076

=σ/√n

By definition, is the approximation of the standard deviation.

Therefore, the value of the standard error should be close to the value of the stand deviation.

The standard deviation for plot 7 is 24.9698; 0ur calculated standard error, 25.98076, is a
close estimate.

T-test:
t-Test: Mean

1 2 3 4 5
Mean 45.9356 46.9692 45.1896 48.0092 45.755
Standard Deviation 8.4159 11.0055 7.0507 8.7563 5.1743
Hypothesized Mean 45 45 45 45 45
df 11 11 11 11 11
t Stat     0.3851 0.6198 0.0931 1.1905 0.5054
P(T<=t) one-tail 0.3538 0.274 0.4637 0.1295 0.3116
t Critical one-tail 1.7959 1.7959 1.7959 1.7959 1.7959
P(T<=t) two-tail   0.7076 0.548 0.9274 0.259 0.6232
t Critical two-tail 2.201 2.201 2.201 2.201 2.201
Remark: (This is just an example of the t-test that we calculated . You can see the rest of
these numbers by going to the excel ‘stat part2 ’ under “t-test”)

Frequenc
Bin y
-3.3 0

-3.1 1
-2.9 0
-2.7 0
-2.5 0
-2.3 0
-2.1 1
-1.9 2
-1.7 2
-1.5 2
-1.3 3
-1.1 8
-0.9 7
-0.7 10
Plot 8 -0.5 14
-0.3 9
-0.1 12
0.1 11
Histogram 0.3 6
16
14 0.5 9
12 0.7 14
10 0.9 4
Frequency

8
6 Frequency 1.1 9
4 1.3 7
2 1.5 4
0
1.7 6
.3 .9 .5 .1 .7 .3 .9 .5 .1 .3 .7 .1 .5 .9 .3 .7 .1
-3 -2 -2 -2 -1 -1 -0 -0 -0 0 0 1 1 1 2 2 3 1.9 2
2.1 2
Bin
2.3 3
2.5 0
2.7 0
2.9 0
3.1 1
More 0
Parameter:
Mean : 0.036648322147651
Standard deviation: 1.03406349311071

The distribution: It is approximately normally distributed

Degree of freedom: 12-1=11

Hypothesis Test:
H0 : µ0 ≠ 45 H1 : µ0 = 45

At 5% significance level.

Number of rejected null hypothesis ≤0.05 ( We can reject H0 when p -value for 2 tails is
less than alpha which is 0.05)

Since we set the level at 5% for the t-tests, there is a 5% chance of making a Type I error. If
we perform the entire test at the 5% significance level we would 7 to 8 test's to reject the null
hypothesis.

Number of rejected null hypothesis: (there are 3 out of 150 samples that have p-value less
than alpha) which is about 2 percent.
Remark : ( 3 is calculated by count-if function on 2 tails p-value rows for all 150 samples.)

H0: p=0.05 H1: p≠0.05

At 2% significance level

p0= 0.05
p
= 0.05
n= 12
p^= 0.02
Z cal= -0.47683

p-value= 2P(Z ≥ |-0.47683| )


= 0.6312
P-value > α; 0.6312 > 0.02 , we do not reject H0
Critical values = -2.33, 2.33 Z cal falls in the acceptance region; we do not reject H 0

Conclusion:
Therefore, there is no significant evidence to infer that the proportion of rejections is not 0.05
at 2% significance level. Based on our test's conclusion we could say that the numbers that
our computer generated are random. This is because the number of tests rejected tested at 5%
level in the previous test is proven to have the proportion of 0.05.

Potrebbero piacerti anche