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

AI1806 Group4 ComputerProjectMAS291-1

The document contains data on various cities around the world including sunshine hours, life expectancy, annual hours worked, happiness levels, and amount of outdoor activities. It includes information on 43 cities. On average, cities received 2,245 hours of sunshine per year with a standard deviation of 567 hours. The average life expectancy across countries was 78 years with a standard deviation of 5 years. Annual hours worked varied widely between cities.

Uploaded by

quaan6324
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)
30 views21 pages

AI1806 Group4 ComputerProjectMAS291-1

The document contains data on various cities around the world including sunshine hours, life expectancy, annual hours worked, happiness levels, and amount of outdoor activities. It includes information on 43 cities. On average, cities received 2,245 hours of sunshine per year with a standard deviation of 567 hours. The average life expectancy across countries was 78 years with a standard deviation of 5 years. Annual hours worked varied widely between cities.

Uploaded by

quaan6324
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

SAMPLE

City Sunshine hours(City) Life expectancy(years) (Country)


Amsterdam 1858 81.2
Sydney 2636 82.1
Vienna 1884 81
Stockholm 1821 81.8
Copenhagen 1630 79.8
Helsinki 1662 80.4
Fukuoka 2769 83.2
Berlin 1626 80.6
Barcelona 2591 82.2
Vancouver 1938 81.7
Melbourne 2363 82.1
Beijing 2671 75.4
Bangkok 2624 74.1
Buenos Aires 2525 75.9
Toronto 2066 81.7
Madrid 2769 82.2
Jakarta 2983 68.5
Seoul 2066 81.3
Frankfurt 1662 80.6
Geneva - 82.6
Tel Aviv 3311 81.9
Istanbul 2218 74.7
Cairo 3542 70.7
Taipei 1405 75.4
Los Angeles 3254 78.8
Mumbai 2584 67.3
Boston 2634 78.8
Dublin 1453 80.5
Tokyo 1877 83.2
Chicago 2508 78.8
Hong Kong 1836 75.4
Shanghai 1776 75.4
Brussels 1546 80.4
San Francisco 3062 78.8
Paris 1662 81.8
Sao Paulo 2003 73.9
Zurich 1566 82.6
London 1633 80.4
Johannesburg 3124 56.3
Milan 1915 82.7
Washington, D.C. 2528 78.8
New York 2535 78.8
Moscow 1901 69.5
Mexico City 2555 76.4
SAMPLE
Annual avg. hours worked Happiness levels(Country) Outdoor activities(City)
1434 7.44 422
1712 7.22 406
1501 7.29 132
1452 7.35 129
1380 7.64 154
1540 7.8 113
1644 5.87 35
1386 7.07 254
1686 6.4 585
1670 7.23 218
1712 7.22 243
- 5.12 223
- 5.99 377
- 5.97 246
1670 7.23 174
1686 6.4 216
- 5.28 114
1967 5.87 144
1386 7.07 23
1557 7.56 44
1898 7.12 139
1832 5.13 419
- 4.15 323
- 5.12 134
1779 6.94 223
- 3.57 187
1779 6.94 88
1772 7.09 159
1644 5.87 387
1779 6.94 171
- 5.51 277
- 5.12 108
1583 6.86 55
1779 6.94 242
1505 6.66 331
- 6.37 158
1557 7.56 69
1538 7.16 433
- 4.81 194
1718 6.38 110
1779 6.94 83
1779 6.94 359
1965 5.54 322
2137 6.46 192
4000 Chart Tit
Sunshine hours (City) 3500
Mean 2245.86 3000
Standard Eror 86.52826
2500
Median 2066
Mode 1662 2000
Standard Deviation 567.4037 1500
Sample Variance 321947
1000
Maximum 3542
500
Minimum 1405
Range 2137 0
0 5 10 15 20 25
Sum 96572
Count 43

Life expectancy(years)(Country
Chart Tit
Mean 78.175 90
Standard Eror 0.799664 80
Median 80.4 70
Mode 78.8
60
Standard Deviation 5.30437
Sample Variance 28.13634 50
Maximum 83.2 40
Minimum 56.3 30
Range 26.9
20
Sum 3439.7
Count 44 10
0
0 5 10 15 20 25

Annual avg.hours worked


Chart Ti
Mean 1672.909 2500
Standard Eror 31.26904
Median 1686 2000
Mode 1779
Standard Deviation 179.6269 1500
Sample Variance 32265.84
Maximum 2137 1000
Minimum 1380
Range 757 500

0
0 10 20 30
1000

500
Sum 55206
Count 33
0
0 10 20 30

Happinesslevels(Country)
Mean 6.435
Standard Eror 0.149429 Chart Ti
Median 6.9
9
Mode 6.94
Standard Deviation 0.991202 8
Sample Variance 0.982481 7
Maximum 7.8 6
Minimum 3.57 5
Range 4.23
4
Sum 283.14
3
Count 44
2
1
0
0 10 20 30

Outdoor activities(City)
Mean 213.9773 Chart Ti
Standard Eror 19.17466 700
Median 189.5
Mode 223 600
Standard Deviation 127.1903 500
Sample Variance 16177.37
Maximum 585 400
Minimum 23
300
Range 562
Sum 9415 200
Count 44
100

0
0 10 20 30 40
Chart Title

10 15 20 25 30 35 40 45 50

Chart Title

0 15 20 25 30 35 40 45 50

Chart Title

20 30 40 50 60
20 30 40 50 60

Chart Title

20 30 40 50 60 70

Chart Title

20 30 40 50 60 70 80 90
Happiness levels(Country)
7.44
7.22
7.29 The sample of 44 cities is collected. Test the claim that the
7.35 level of significa
7.64
7.8
5.87 H0: μ = 6.7
7.07 H1: μ ≠ 6.7
6.4
7.23
7.22
5.12 x̄ 6.435
5.99 s 0.991202
5.97 n 44
7.23 α 0.05
6.4
5.28
5.87
7.07 Test statistic
7.56 𝑇_0 -1.773414 >Acceptance region
7.12 𝑇_(𝛼/2,𝑛−1)2.016692 > Fail to reject H0
5.13
4.15
-2.016692
〖−𝑇〗 _(𝛼/2,𝑛−1)
5.12
6.94
3.57
6.94
7.09 Two-sided 95% confident interval
5.87 x̄ 6.435
6.94 s 0.991202
5.51 n 44
5.12 𝑇_(𝛼/2,𝑛−1) 2.0166922
6.86
6.94 𝑥̄ - 𝑇_(𝛼/2,𝑛−1) 𝑠/√𝑛6.13364705
6.66
6.37 𝑥̄ + 𝑇_(𝛼/2,𝑛−1) 𝑠/√𝑛6.73635295
7.56
7.16 6,134 ≤ μ ≤ 6,736
4.81
6.38
6.94
6.94
5.54
6.46
ed. Test the claim that the average happiness levels of cities(countries) is μ = 6.7 at a
level of significance of α = 0.05.

>Acceptance region Summary: This data support the hypothesis that


> Fail to reject H0 average happiness levels of cities μ = 6.7
Sunshine hours per year(City)
1858
2636
A city with sunshine hours from 2000 to 3000 is c
1884 Assume that at least 80 percent of cities have sun
1821 Test the hypothesis, known that the signifi
1630
1662
2769 Ho: p ≥0.8
1626 H1: p < 0.8
2591
1938
2363 n 43
2671 x 19
2624 𝑝_0 0.8
2525 𝑝 ̂ 0.44186
2066 𝛼 0.05
2769
2983
2066 Test statistic
1662 𝑧_0 -5.871195
- 〖−𝑧〗 _𝛼 -1.644854
3311
2218
3542
1405 Two-sided Confidence Intervals
3254 𝑧_(𝛼/2) 1.959964
2584 " " √(□(64&(𝑝 ̂(1−𝑝 ̂))/𝑛)) " "
0.11393
2634
1453 𝑝 ̂ - 𝑧_(𝛼/2)
√((𝑝 ̂(1−𝑝 ̂))/𝑛) 0.218562
1877
2508 𝑝 ̂ 〖 + 𝑧 〗 _𝛼 √(□(64&(𝑝 ̂" " (1−𝑝 ̂" "0.665159
))/𝑛)) " "-
1836
1776 0,22≤ p ≤ 0,67
1546
3062
1662
2003
1566
1633
3124
1915
2528
2535
1901
2555
e hours from 2000 to 3000 is considered an ideal city.
80 percent of cities have sunshine hours in this range.
othesis, known that the significant level is 0.05.

> Critical region Summary: Less than 80% of cities have sunshine hours outside
> Reject Ho of about 2000 to 3000. Less than 80% of cities are ideal cities

" " ))/𝑛)) " "-


Outdoor activities(City) (Sunshine hours>2000) Outdoor activities(City) (Sunshine hours < 2000)
406 422
154 132
218 129
243 113
223 35
377 254
246 585
216 88
144 108
419 55
323 242
134 331
223 158
187 69
159 433
387 194
171
277
With alpha = 0.05, is the average outdoor activities of a city with sunshine hours higher than
2000 is 150 activities more various than the average outdoor activities of a city with sunshine
hours less than 2000 ?

Ho µ1 - µ2 = 150
H1 µ1 - µ2 ≠ 150

𝑛_1 18
𝑛_2 16
𝑥 ̅_1 250.388888889
𝑥 ̅_2 209.25
𝑠_1 93.9187000667
𝑠_2 158.686903471 > Critical region
𝑆_𝑃^2 16489.8524306 > Reject Ho
df 32
150
-2.4672954822
𝛼 0.05
𝑡_(𝛼/2,𝑑𝑓)2.03693334346
-2.0369333435
〖−𝑡〗 _(𝛼/2,𝑑𝑓)

Two-sided confidence interval for µ1 - µ2


𝑥 ̅_1 𝑥 ̅_2 41.139
89.8728298375323

-48.734

131.012

≤ µ1 - µ2 ≤ 131.012
Summary: average outdoor activities of a city with sunshine hours higher
than 2000 is not 150 activities more various than average outdoor
activities of a city with sunshine hours 2000 or less.
Take proportion of European cities
City Outdoor activities(City) Continent and Asian cities with outdoor activi
Amsterdam 422 European is any difference. Use
Sydney 406 Oceania 𝐻_0 𝑃_1 = 𝑃_
Vienna 132 European 𝐻_1 2
𝑃_1 ≠ 𝑃_2
Stockholm 129 European
Copenhagen 154 European 𝑛_1 19
Helsinki 113 European 𝑛_2 11
Fukuoka 35 Asia x1 6
Berlin 254 European x2 2
Barcelona 585 European 𝑝 ̂_1 0.315789
Vancouver 218 North America 𝑝 ̂_2 0.181818
Melbourne 243 Oceania 𝛼 0.1
Beijing 223 Asia 𝑧0 0.79963
Bangkok 377 Asia df 28
Buenos Aires 246 South America 𝑧_(𝛼/2) 1.644854

Toronto 174 North America 〖−𝑧〗 _(𝛼/2)-1.644854


Madrid 216 European pooled p 0.266667
Jakarta 114 Asia
Seoul 144 Asia
Frankfurt 23 European Two-sided Confidence Interval for
Geneva 44 European 𝑝 ̂_1−𝑝 ̂_2
Tel Aviv 𝑧_(𝛼/2)
139 Asia √(□(64&(𝑝 ̂_1 (1−𝑝 ̂_1))/𝑛_1 )+□(64&(𝑝 ̂_2 (1−𝑝 ̂_2))/𝑛_2 ))
Istanbul 419 European
Cairo 323 Africa
𝑝 ̂_1−𝑝 ̂_2−𝑧_(𝛼/2) √(□(64&(𝑝 ̂_1 (1−𝑝 ̂_1))/𝑛_1 )+□(64&(𝑝 ̂_2 (1−𝑝 ̂_2))
Taipei 134 Asia
Los Angeles 223 North America √(□(64&(𝑝 ̂_1 (1−𝑝 ̂_1))/𝑛_1 )+□(64&(𝑝 ̂_2 (1−𝑝 ̂_2))/
𝑝 ̂_1−𝑝 ̂_2+𝑧_(𝛼/2)
Mumbai 187 Asia
Boston 88 North America -0.12556 ≤ 𝑝 ̂_1−𝑝 ̂_2≤ 0.393502
Dublin 159 European
Tokyo 387 Asia
Chicago 171 North America
Hong Kong 277 Asia
Shanghai 108 Asia
Brussels 55 European
San Francisco 242 North America
Paris 331 European
Sao Paulo 158 South America
Zurich 69 European
London 433 European
Johannesburg 194 European
Milan 110 European
Washington, D.C. 83 North America
New York 359 North America
Moscow 322 European
Mexico City 192 South America
portion of European cities with outdoor activities higher than 300
cities with outdoor activities higher than 300, determine if there
is any difference. Use 10% level of significance.

> Acceptance region


Summary: the proportion of European cities with outdoor activities high
> Fail to reject 𝐻_0 than 300 and the Asian ones may share the same value

e Interval for𝑃_1−𝑃_2
0.133971
𝑝 ̂_2 (1−𝑝 ̂_2))/𝑛_2 ))
0.259531

)+□(64&(𝑝 ̂_2 (1−𝑝 ̂_2))/𝑛_2 ))
-0.125559

+□(64&(𝑝 ̂_2 (1−𝑝 ̂_2))/𝑛_2 ))
0.393502
≤ 0.393502
ties with outdoor activities higher
e same value
Happiness levels(Country) Life expectancy(years) (Country) SUMMARY OUTPUT
7.44 81.2
7.22 82.1 Regression Statistics
7.29 81 Multiple R
7.35 81.8 R Square
7.64 79.8 Adjusted R Square
7.8 80.4 Standard Error
5.87 83.2 Observations
7.07 80.6
6.4 82.2 ANOVA
7.23 81.7
7.22 82.1 Regression
5.12 75.4 Residual
5.99 74.1 Total
5.97 75.9
7.23 81.7
6.4 82.2 Intercept
5.28 68.5 Happiness levels(Cou
5.87 81.3
7.07 80.6
7.56 82.6
7.12 81.9
5.13 74.7
90
4.15 70.7
5.12 75.4 85
6.94 78.8 f(x) = 3.87759280606533 x + 5
80 R² = 0.525026442527142
3.57 67.3
6.94 78.8 75
7.09 80.5
Life Expectancy

5.87 83.2 70
6.94 78.8 65
5.51 75.4
5.12 75.4 60
6.86 80.4
55
6.94 78.8
6.66 81.8 50
6.37 73.9
45
7.56 82.6
3.5 4 4.
7.16 80.4
4.81 56.3
6.38 82.7
6.94 78.8
6.94 78.8 Happiness Levels
5.54 69.5 1
6.46 76.4 4
5.76
6.13
6.89
Regression Statistics
0.724587084156999
0.525026442527142
0.513717548301598
3.69894674737992
44

df SS MS F Significance F
1 635.20980432 635.2098043 46.42597517 2.686384E-08
42 574.65269568 13.68220704
43 1209.8625

Coefficients Standard Error t Stat P-value Lower 95% Upper 95%


53.2226902929697 3.7043134122 14.36776114 8.22E-18 45.747083174 60.698297412
3.87759280606532 0.5690909557 6.813660923 2.686384E-08 2.7291207612 5.0260648509

Life expectancy(years) (Country)


90

85
f(x) = 3.87759280606533 x + 53.2226902929697
80 R² = 0.525026442527142

75

70

65

60

55

50

45
3.5 4 4.5 5 5.5 6 6.5 7 7.5 8

Happiness

Predicted Life Expectancy


57.100283099035
68.733061517231
75.5576248559059
76.9923341941501
79.9393047267598
Lower 95.0% Upper 95.0%
45.7470831744 60.6982974115483
2.72912076122 5.02606485091018

Country)

Life expectancy(years) (Country)


Linear (Life expectancy(years) (Country))

7.5 8 8.5

You might also like