數學百子櫃系列 ( 十五)
2012/13 中學生統計創意寫作比賽
作品集
數學百子櫃系列
( 十五 ) 2012/ 13 中學生統計創意寫作比賽 作品集 教育局數學教育組
教育局數學教育組編訂 政府物流服務署印
Prepared by the Mathematics Education Section, the Education Bureau of the HKSAR
Printed by the Government Logistics Department 教育局
課程發展處數學教育組
9 789888 159246
ISBN 978-988-8159-24-6
i
數學百子櫃系列 (十五)
2012/13 中學生統計創意寫作比賽
作品集
教育局
課程發展處數學教育組
ii 版權
©2013 本書版權屬香港特別行政區政府教育局所有。本書任何部分 之文字及圖片等,如未獲版權持有人之書面同意,不得用任何方式抄 襲、節錄或翻印作商業用途,亦不得以任何方式透過互聯網發放。
ISBN 978-988-8159-24-6
iii
編者的話
為配合香港數學教育的發展,並向教師提供更多的參 考資料,課程發展處數學教育組於2007年開始邀請大學學 者及資深教師撰寫專文,以及蒐集及整理講座資料,輯錄 成《數學百子櫃系列》。本書《2012/13 中學生統計創意 寫作比賽作品集》,是這個系列的第十五冊。本書輯錄的 文章,大部分是「2012/13中學生統計創意寫作比賽」的 優勝作品,由參賽的中學生撰寫。
本書所輯錄的參賽作品嘗試透過統計創意寫作,以簡 潔的語言輕鬆地介紹概率和統計的知識。
本書共有 14 篇文章,第 1 至 8 篇為「2012/13中 學生統計創意寫作比賽」的冠軍、亞軍、季軍和優異作 品。其餘 6 篇則為邀請作品,分別由政府統計處的統計 師,數學教育組的借調教師及課程主任,以及香港大學統 計及精算學系的教授撰寫。讀者們可隨意選讀各篇文章。
本書的故事大部分顯淺易懂,讓讀者很容易理解基礎統計 中的概念。本書的出版,望能豐富統計教材的資源,讓統 計教學變得更有趣,學生能就著不同的情境理解如何有效 運用統計於生活上。
iv
此書得以順利出版,實有賴籌備委員會各成員所付出 的努力。在此,謹向撰寫作品的得獎隊伍、政府統計處的 統計師、香港大學精算及統計學系的教授和數學教育組的 同工致以衷心的感謝。最後,更要多謝籌備委員會主席楊 良河博士和評審委員會首席評審員張家俊博士的鼎力協 助,審訂本書的內容,讓學生能夠閱讀更多有趣的文章,
增強他們學習統計的興趣。
如對本書有任何意見或建議,歡迎以郵寄、電話、傳 真或電郵方式聯絡教育局課程發展處數學教育組:
九龍油麻地彌敦道405號九龍政府合署4樓 教育局課程發展處
總課程發展主任(數學)收
(傳真: 3426 9265 電郵: [email protected])
教育局課程發展處 數學教育組
v
前言
香港統計學會一直致力向社會各界推廣對統計的認 知。除了每年與教育局合辦「中學生統計習作比賽」
(SPC),以鼓勵同學透過團隊合作形式學習正確運用統計 數據及增進對社會的認識外,我們於2009年再與教育局 合作創辦「中學生統計創意寫作比賽」(SCC) ,旨在鼓 勵學生透過創意的手法,以及科學和客觀的精神,用文 字表達日常生活所應用的統計概念或利用統計概念創作 一個故事。
回顧過去的參賽作品,喜見同學們對統計概念有更 深入的認識及掌握如何正確地運用統計。近年,得獎作 品的質素亦有所提升。
本年度的比賽專題是「離群值」。多謝香港大學統計 及精算學系講師關志威博士在比賽簡介會中介紹有關離 群值的概念,並鼓勵同學在離群值這課題上發揮創意。
繼承以往的優良成績,今屆的SCC收到約50份參賽作 品,當中不乏精彩之作。本書輯錄今屆所有得奬作品,
藉此嘉許得奬同學所付出的努力。
本人藉此機會感謝籌備委員會和評審委員會全體成
vi
員和評審的幫助和支持。他們的不遺餘力無疑是有助提 高學生對統計的認知和興趣。最後,感謝香港大學統計 及精算學系贊助今屆比賽的最佳專題寫作獎。
籌備委員會主席 楊良河博士 2013年9月9日
vii
序言
是次「中學生統計創意寫作比賽」共收到近 50 份參賽作 品,經由教育局、政府統計處和香港大學統計及精算系內 從事統計工作及教育的專業人士所組成的評審團進行評 審。評審標準主要為創意和趣味性,及對統計知識的闡釋 和正確應用。我謹此鳴謝一眾評審團成員,感激他們公正 嚴謹地為我們選出優勝作品。
本書輯錄了今屆所有的得奬作品。能夠從芸芸參賽作品中 脫穎而出,這些優勝作品都有其過人之處。文章取材創 新,趣味盎然;同學能活學活用各種統計和概率的知識,
分析有條有理,見解獨到,言之有物。中學生能有這樣的 水平,實在難能可貴,值得欣喜和嘉許。希望同學能夠從 創作或閱讀這些得奬作品中得到啟發,對統計的知識及其 運用有更深入和正確的理解。
評審委員會首席評審員 張家俊博士 2013年9月10日
viii
(空白頁)
ix 目錄
編者的話 ... iii
前言 ... v
序言 ... vii
冠軍作品: Mysteries in Ecology ... 1
亞軍作品: 如何運用統計學種神奇豌豆 ... 19
季軍作品: 得籃板,得天下? ... 34
優異作品: 移宮換羽 ... 50
優異作品: 一血定生死 ... 60
優異作品: “Detective ‧ Banker” ... 71
優異作品: 估市? 股市 – 從過去估計將來 ... 99
優異作品: 「NBA 勝利因素」 ... 127
邀請作品:抄襲疑雲 ... 137
邀請作品:「樣本方差」除以「n-1」的疑問 ... 145
邀請作品:購物天堂還是洛陽紙貴? ... 154
邀請作品:檢定養魚秘訣的小實驗 ... 159
Invited Article: An Experiment in Statistics ... 164
Invited Article: The Road to Fairness ... 175
x
(空白頁)
1
冠軍作品: Mysteries in Ecology
An Astonishing Truth or just a Game of Numbers?
School Name: Shau Kei Wan Government Secondary School Student Name: Wu Tsun Wai, Chan Chui Shan, Yu Sin Ting
Level: Secondary 5
Supervising Teacher: Wong Pui Shan
Introduction
For a set of numerical data, an outlier refers to the number that is markedly smaller or larger than other values. By following the footprints of two ecologists, Kathy and Ernest, we are going to learn more about
the causes of outlier and its identifications, as well as the mathematical ways to solve them. Let’s begin our journey!
2
The story begins…
The Problem
Kathy and Ernest were two passionate amateur ecologists working in a research station in the northern part of Greenland.
She had been studying the predator-prey relationships of arctic wolf and northern lemmings in Greenland before she found difficulty analysing the data collected.
Kathy: Mmm…. Why is that so strange? I have gathered some data focusing on the fluctuation of the population of arctic wolf and northern lemmings here, but there seems to be a …… slight problem……
Source: San Diego State University
3
Source: Government of Greenland, Ministry of Fisheries, Division on Wildlife Management
*We adopted the above data to estimate the number of arctic wolf and northern lemmings.
Ernest: In a predator-prey relationship, the usual populations of the prey and predators fluctuate with an apparent time lag. In our study, the wolf and the lemmings are the predator and prey respectively. Nevertheless, the trend of their populations does not proceed as we have expected.
Kathy: The sections representing the change in the population of these two types of animals in the year of 1975 and
0 50 100 150 200
1950 1960 1970 1980 1990 2000
Number of or ganisms (x10
3)
Changes in the Population of Arctic Wolf and Northern Lemmings in Greenland between
1950 and 2000
arctic wolf
northern lemmings
4
from 1990 to 2000 just do not make sense. I cannot figure out what the data means.
Ernest: Shall we call for my friend, Herman for help? His aptitude to statistics will surely give us a boost in our progress.
Feeling desperate for help, they turned to Herman for advice.
Kathy: Here is a line graph (P.2) showing the populations of the two species.
Herman: Let me see……Well, such a graph cannot tell anything but I am sure that your data is not without outliers.
Ernest: Sorry? What are outliers?
Herman: Outlier refers to things or phenomena that lie outside normal experience. In statistics, it is one that appears to deviate markedly from the majority of the samples or data obtained.
Ernest: Oh, I see.
5
Fundamental Analysis
Kathy: My data shows some unusual changes which I have named those as Region A and Region B.
Ernest: How can we make use of the concepts of outliers?
Herman: Well, first and foremost, I want to have a look of the population of arctic wolf collected in the year of 1980.
Kathy: Alright. Here it is.
6 Site
1
Site 2
Site 3
Site 4
Site 5
Site 6
Site 7
Site 8
Site 9
Site 10
4 5 3 4 13 8 3 1 2 43
Site 11
Site 12
Site 13
Site 14
Site 15
Site 16
Site 17
Site 18
Site 19
Site 20
1 4 6 5 4 46 3 37 4 5
*Fabricated materials
People at that time used to estimate the population at different sites. The area of each site is about 100 km2. By calculating the population density (population / km2), we can find out the approximate number of organisms in one place, i.e. the formula is as follows,
Population density × Area = Estimated population
Total Area of Greenland = 2166086 km2
Area of Ice-free waters = 410449 km2
Excluding the ice-free waters in Greenland, its area is about 1755637 km2
7
“Spot the Outliers!!” ‐ Learning the Basics
Herman: By simple calculations, we can obtain the following information:
Mean Min Q1 Median Q3 Max S.D.
10.05 1 3 4 6.5 46 13.73126
You may see that there are three numerical values that are far beyond the interquartile range, which is a range laying between Q1 and Q3. Despite an apparent observation, we still have dozens of methods to prove outliers.
Kathy: Honestly speaking, Ernest and I neither are interested in statistics nor have the skills to operate complex calculations. Could you suggest a decent method for us to identify outliers with ease?
Herman: By all means! We may adopt a suitable outlier checker.
The initial step is to find out Q1, Q3, interquartile range (IQR). The first two have been calculated while the IQR is 6.5-3=3.5. Next, we set a fence. It consists of an upper fence and a lower fence. Together, they
8
construct an outlier checker. Data not lying between the fences are considered outliers. One definition of outlier is to multiply the IQR by 1.5, and 3.5×1.5=5.25.
After that, we can find out the lower fence and the upper fence.
Ernest: 3-5.25 < 0 and 6.5 + 5.25=11.75. As the data must be positive, the lower fence and the upper one are 0 and 11.75 respectively, right?
Herman: You got it. Outliers are any values that are 12 or above.
Kathy: Based on the results, we can now eliminate the outliers obtained at site 5, 10, 16 and 18.
Ernest: And a new set of information is obtained.
Site 1 Site 2 Site 3 Site 4 Site 5 13
Site 6 Site 7 Site 8 Site 9 Site 10 43
4 5 3 4 8 3 1 2
Site 11
Site 12
Site 13
Site 14
Site 15
Site 16 46
Site 17
Site 18 37
Site 19
Site 20
1 4 6 5 4 3 4 5
Mean Min Q1 Median Q3 Max S.D.
3.875 0 3 4 5 8 1.727534
9
Kathy: Let’s compare the data before and after outlier exclusion.
Estimated population before the amendment = (10.05/100) 1755637 ≈ 176000
Estimated population after the amendment = (3.375/100) × 1755637 ≈ 59300
Wow! That’s a big difference!
Herman: Yes, without identifying the outliers, the box plot expressing the data will be:
But with an outline checker we can identify the outliers and plot a decent graph.
0 10 20 30 40 50
Population of Arctic Wolf
Distribution of Data at Different Sites
10
Nevertheless, as we have excluded the outliers from our analysis, we must state that in the report. In addition, you should show them in the box plot like this:
Ernest: Hey! I have just remade our line graph with the new set of data. This time, the trend looks smooth enough.
0 2 4 6 8 10
Population of Arctic Wolf
Distribution of Data at Different Sites
11 0
50 100 150 200
Number of or ganisms (x10
3)
Changes in the Population of Arctic Wolf and Northern Lemmings in Greenland
between 1950 and 2000
arctic wolf
northern lemmings
12
A Suitable Method
Kathy: Thanks Herman! I really appreciate your effort.
However, I really want to know why the outliers in the above case can be addressed simply through exclusion.
Herman: That’s easy enough. Don’t you notice the problem of the original data?
Kathy: Well, the data is not really even, with several extreme cases.
Herman: You got the point. There must be something wrong with the sampling method that people at that time used.
Wolves are not fussy eaters. Some research sites might have been chosen with a sheepherding ground which attracts a lot of wolves! (laugh). But anyway, as the number of wolves should be nearly the same in Greenland where everywhere has a similar habitat, I just eliminate the outliers. I think in statistics, you really need to take every case into separate consideration and use the appropriate statistics- analysing tactics.
Kathy: How can we eradicate this discrepancy then?
13
Herman: I am not a professional in ecology. But it is important that people pick random sites for investigations and do increase the size of investigation to minimize sampling errors.
Kathy: I see what you mean. Anyway, now I know that the first function of outliers is to remove inaccuracies in statistics.
14
Observe. Think. Analyse. Conclude.
Kathy: The first part of the problem is solved. Now it is time we dealt with the second one. The population of lemmings has never proliferated since its decrease in number during the early 90s. What is even stranger is the population of arctic wolves. There is a plunge
which suggesting that the ecosystem in Greenland may have experienced some degree of disruption.
Ernest: I have just analysed relevant data using the outlier checker method. Let me show you my work,
15
Fluctuation of population of northern lemmings from 1850 to 2000
Site
1
Site 2
Site 3
Site 4
Site 5
Site 6
Site 7
Site 8
Site 9
Site 10
1985
6 10 13 12 6 9 10 13 12 6
1990
6 2 3 3 1 1 1 4 2 1 1995
5 2 0 2 0 1 1 1 0 0 2000
7 3 0 2 0 1 0 2 0 0
Site 11
Site 12
Site 13
Site 14
Site 15
Site 16
Site 17
Site 18
Site 19
Site 20
1985
11 12 9 6 8 4 10 13 12 12 1990
3 2 8 2 3 1 5 1 2 4 1995
2 0 7 1 1 0 1 0 0 1 2000
2 0 7 1 1 0 2 0 0 2
Likewise, I obtained a set of information.
Mean Min Q1 Median Q3 Max S.D.
1985 9.7 4 7.5 10 12 13 2.758623
1990 2.75 1 1 2 3.25 8 1.840516
1995 1.25 0 0 1 1.25 7 1.757128
2000 1.5 0 0 1 2 7 2.061553
I managed to locate the outliers (as highlighted above) and I think I could calculate the approximate population of lemmings in Greenland, using the above data. Nevertheless, I found that even if I exclude the
16
outliers when plotting the graph, the population of northern lemmings does not show any token of a rebound. Can you give an account for this, Herman?
Herman: I am afraid that your worries are becoming a fact. To analyse the situation, you first need to think wisely.
Kathy has made a remarkable observation, saying that both populations drop. As the two populations are correlated under a predator-prey relationship, something happened on the natural habitat. I do not think the result is due to human or experimental errors.
Kathy: Perhaps it is due to human activities caused by the development of those places. Pollution and exploitation of the nature may have resulted in this.
Otherwise, it may be a spread of disease that has fuelled this.
Ernest: I still have one more question. There are some sites with a constant population. Why is that?
Herman: That is another use of outliers. The outliers in this case unveil that there are some regions unaffected by the drop. In these cases, outliers may carry significances and should not to be ignored. You ought to do some follow-ups with that.
17
Kathy: Ah! Therefore a good data analysis must be a balanced consideration of the data collected and the real situation. We should keep sober when doing analyses and combine the reality with a suitable analysing method.
A Little Reflection:
Science and mathematics are closely related. Statistics is a big area that both subjects will come across. In this project, we combine elements of both sides into one written report, with a view to stretching our thoughts. This is a topic that we hammered out after a long time of discussion. We hope our effort can inspire everyone and let them know how extensively statistics can be applied in our life. Thank you.
18
References:
1. Area of Greenland
http://en.wikipedia.org/wiki/Greenland#ref_ddd
2. Government of Greenland: Ministry of Fisheries --Division on Wildlife Management
http://uk.nanoq.gl/
3. Box-and-Whisker Plots: Interquartile Ranges and Outliers
http://www.purplemath.com/modules/boxwhisk3.htm
4. Predator-prey relationship between arctic fox and lemming
http://onlinelibrary.wiley.com/doi/10.1046/j.1365-
2656.1999.00258.x/full
5. Arctic wolf
http://en.wikipedia.org/wiki/Arctic_wolf
6. Kjeld Hansen (Jan 2002). A Farewell To Greenland’s
Wildlife. Baeredygtighed Press.
19
亞軍作品: 如何運用統計學種神奇豌豆
學 校 名 稱 : 荃 灣 官 立 中 學
學 生 姓 名 : 曹 惠 琪 、 林 建 宏 、 李 錦 輝 級 別 : 中 五
指 導 老 師 : 陳栢垣老師
引言
天氣與我們生活息息相關,尤其是從事農業活動的人。我們 希望運用統計學的方法,包括幾何分佈、離群值和二項分 佈,探討各種天氣的規律。我們使用香港天文台的數據,借 一個故事,初窺統計學入門。
20
故事發生於 2013 年 6 月,主角是愛麗絲,她和母親住在香 港的一處郊區。她們生活非常困苦,家中唯一的財產是一頭 母牛,她們只能靠賣牛奶勉強賺錢維生。
一天,愛麗絲在家附近玩耍時,一位身穿白袍的老婦拍了她 的肩膀一下,然後說:「小女孩,我把這兩顆神奇的豌豆種 子送給你。」
愛麗絲歡天喜地拿著兩顆種子,回到家中,打算把它們好好 種植,等到收成後便拿去賣,可是她不知道怎樣種植豌豆。
正當愛麗絲為如何種植豌豆而煩惱時,「鈴 — 鈴 —」,她 的電話忽然響起,於是她拿起電話一看,發現了以下的短 訊:
豌豆婆婆
小女孩,我是給你神奇豌豆的婆婆。
你懂得種植這種神奇豆子嗎?
愛麗絲
不懂得啊!可以教我怎樣種植這些豌豆嗎?
21
豌豆婆婆
當然可以。這種豌豆生長條件十分特別,它 的生長條件只會視乎過去 16 年的天氣數 據,生長的月份必須是六月,只會在不是炎 熱的晚上(簡稱涼夜)生長,而且必須是連 續五晚都是涼夜,才能成功發芽。
如果當中一晚是天氣炎熱的(簡稱熱夜),
豌豆便會死掉。
(注:“熱夜”-日最低温度不低於 28oC 1)
愛麗絲
需要連續五晚都是涼夜!?這根本不可能 吧!現在是夏天呢!
豌豆婆婆
你 應 該 沒 有 學 過 幾 何 分 佈 (Geometric Distribution) 吧?
在講述幾何分佈前,我先向你解釋伯努利試 驗(Bernoulli Trial)。伯努利試驗是指只有兩 種可能結果的單次隨機試驗。以一個晚上為 例,只能是熱夜或不是熱夜,樣本空間就是 集合{“熱夜”, “涼夜”},因此是一種伯努利
22
試驗。
現在講幾何分佈。在伯努利試驗中,X 是得 到一次成功所需要的試驗次數。在得到第一 次成功之前所經歷的失敗次數
Y = X – 1。如果每次試驗的成功概率是 p,
那麼經歷 k 次失敗後得到一次成功的概率是 P(Y = k) = p(1 – p)k,其中 k = 0, 1, 2, 3, …。
至於 Y 的期望值 E(Y) = p
p1
。(見附頁 1)因此我們可以計算出現熱夜前所出現的涼夜 數目 Y 的期望值。假設每晚的天氣相互獨 立 , 並 參 考 天 文 台 的 數 據 , 過 去 16 年 (1997–2012 年)每年六月份熱夜日數如下1:
年份 6 月熱夜日數
2012
62011
52010
52009
22008
02007
32006
32005
52004
723
愛麗絲根據豌豆婆婆的指示種下了第一顆種子,雖然往後 連續五晚都是涼夜,但是種子沒有發芽,而且死掉了。愛 麗絲於是又向豌豆婆婆求救。
年份 6 月熱夜日數
2003
52002
82001
22000
61999
21998
101997
4平 均 熱 夜 日 數 是 4.5625。 由 於六月 有 30 天,因此 2013 年出現熱夜的估計概率為
152 30 0
5625 4
. .
p ˆ
。假設ˆ p
= p, 那麼出現一 晚熱夜前所出現的涼夜數目 Y 的期望值 E(Y)= pˆ ˆp
1
5.58 天。這代表如果你今天種下 豌豆,在出現一晚熱夜前,該會有約五天半 的涼夜,豌豆只需要連續五晚涼夜,而連續 五晚涼夜的估計概率為(1 –p ˆ
)5 = 0.438,概 率有四成以上,因此可以值得一試種下豌 豆。24
愛麗絲
我種下豌豆後,連續五晚都是涼夜,但 是豌豆卻沒有發芽!為甚麼?
豌豆婆婆
小女孩,雖然最近連續五晚都是涼夜,
但這年的六月降雨特別多。神奇豌豆只 適合在六月正常的雨量下種植。本月總 降雨量有 1400 毫米(此數字為配合故事 而虛構),比 2008 年 6 月總降雨量還要 多,因此豌豆不能生長。
愛麗絲
那如何界定為"不正常"雨量?
25
豌豆婆婆
這可以用離群值來解釋。離群值是指在 數據中有一個或幾個數值與其他數值相 比差異較大。離群值的判別有很多種方 法 , 其 中 一 種 方 法 是 Chauvenet’s criterion (音譯:肖維內)。首先,我們需 要 計 算 數 據 集 的 平 均 值
x
以 及 標 準 差
,如要測試其中的某一數據是否離群 值,可以計算該數據的標準分 x x
, 用 正 態 分 佈 找 出 P(
x
Z
x
) , 若P( x Z
x
) <n
21 (n 為數據量), 即代 表該數據則可判為離群值2。
翻查香港天文台的資料,以下是香港天 文台過去 16 年六月份總雨量的資料 (神 奇豌豆生長條件只會視乎過去 16 年的 天氣數據3):
年份 總雨量(mm)
2012
261.52011
435.62010
474.92009
341.82008
1346.126
年份 總雨量(mm)
2007
490.12006
469.22005
893.92004
144.72003
523.52002
237.62002
237.62001
1083.62000
443.31999
197.41998
814.51997
783.6例如,新華網在 2008 年 06 月 27 日報 導,該年 6 月「已經成為香港有紀錄以 來最多雨的 6 月」4。
由以往的數據得出,6 月份的平均降雨 量 為 558.83mm , 標 準 差 為 327.28mm 。 2008 年 6 月 的 降 雨 量 是 1346.1mm , 標 準 分 是
28 . 327
83 . 558 1 . 1346
= 2.40552。
從正態分佈,得出 P( Z > 2.40552) =
27
0.0161。
因 為
32
1 ) 16 ( 2
1 2
1
n = 0.03125 , 而 0.0161 < 0.03125,所以 1346.1 是離群 值。本月雨量比 2008 年 6 月時還要 多,只能說你太倒霉了。或許你下年 6 月再試試種第二顆種子吧。
愛麗絲
好吧。
2014 年 6 月,愛麗絲成功種植豌豆了,豌豆的藤蔓穿透雲 頂。愛麗絲好奇想要往上爬,看看雲上的世界,但她擔心:
如果我在攀爬的途中遇上危險,如雷暴的話,要怎麼辦呢?
我會被雷擊嗎?
於是她再問豌豆婆婆。
28
愛麗絲
豌豆婆婆,我的神奇豌豆長成了,我想看 看雲上面的世界,但我擔心在攀爬的途中 會遇上雷暴。前幾天一直都是好天氣,那 麼接下來的幾天會不會快要打雷呢?
豌豆婆婆
這 要 用 上 二 項 分 佈 (Binomial Distribution) 了。
二項分佈是 n 個獨立的是與非試驗中成功 的次數的離散機率分佈,其中每次試驗的 成功概率為 p。
一般的二項分佈是這樣的:假設某事件 X 的發生概率為 p,而試驗做了 n 次。則 n 次 中 , 某 事 件 發 生 k 次 的 概 率 為
X k C
knp
k p
n kP
1 其 中 k = 0, 1, 2, …, n.至於 X 的期望值 E(X) = np。(見附頁 2) 根據香港天文台關於 1981-2010 年的資料作 為樣本,在 6 月份雷暴的樣本平均日數為 7.03 天,6 月有 30 天。所以樣本概率為
29
234 . 30 0
03 . 7
p
。由於二項分佈樣本的期望值同樣是 np (見附 頁 3),假設每天的天氣情況互相獨立,你 需要 10 天才能爬上藤蔓頂部,估計在這十 天內雷暴的日數為 10 0.234 = 2.34 天。在 你爬上藤蔓頂部時,只會有 2.34 日遇上雷 暴,風險不算太高。而且,遇上雷暴時,
你仍可以嘗試藏在藤蔓裡躲避。你那就不 如試一試吧!
愛麗絲計算好日子,終於在天朗氣清的一天爬上了藤蔓,到 達了雲的上面。她看到一座宏大的城堡,便向內走去。城堡 內坐著一個巨人,巨人正在數著巨大桌子上一袋袋的金幣。
愛麗絲爬上桌面,跟巨人表明身份,巨人竟然對愛麗絲的智 慧和勇氣深表敬佩,他答應給愛麗絲一袋金幣,並教導她做 生意的秘訣。
愛麗絲離開城堡後把通往雲上的藤蔓斬了。愛麗絲嘗試再發 短訊給豌豆婆婆,但豌豆婆婆已消失得無影無蹤。她運用從 豌豆婆婆和巨人處學到的知識,包括運用統計學預測天氣的 狀況而達至相應的用途,成為了一代的女富豪。
30
附頁:
(i) 計算幾何分佈 P(Y = k) = p(1 – p)k
, k = 0,1,2…,的期望值
E(Y) =
0
) 1 (
k
p k
p k
=
0
) 1 (
k
p k
k p
=
1
1
( 1 ) )
1 (
k
k p
p k p
=
1
)
11 ( ) 1 (
k
p k
k p p
=
1
) 1 ( )
1 (
k
p k
dp p d p
=
1
) 1 ( )
1 (
k
p k
dp p d p
=
) 1 ( 1 ) 1 1
(
pp dp
p d
p
(注:等比數列無限和為
r S a
1 , 當中 a 為首項,r 為數 列相鄰兩數之比)
=
p p dp p d
p
1
) 1 (
=
1 ) )(
1
(
2p p p
=p
p1
31
(ii) 計算二項分佈
P X
k
C
knp
k
1p
nk, k = 0, 1, 2,…, n, 的期望值E(X) =
n
k
k k n
n
kp p
C k
0
1
=
n
k
k n
k p
k p n k k n
1
) 1 )! ( (
!
! (當 k = 0, kCknpk
1 p
nk 0)=
n
k
k n
k p
k p n k
n
1
) 1 )! ( ( )!
1 (
!
=
n
k
k n
k p
k p n k
np n
1
1
( 1 ) )!
( )!
1 (
)!
1 (
=
1
0
) 1
)
(1 ))! ( 1 ( (
!
)!
1
n
(
k
k n
k p
k p n k np n
=
1
0
)
11 )! ( 1 (
!
)!
1
n
(
k
k n
k p
k p n k np n
= np (
1
0
) 1
1 )! ( 1 (
!
)!
1
n (
k
k n
k p
k p n k
n = [p + (1 – p)]n = 1)
32
(iii) 計算二項分佈樣本的期望值
E(S) = E(
n X
n
i
i1 ) (n 為樣本數量)
=
n
1 E(
n
i
Xi 1
) =
n
1
n
i
Xi
E
1
) (
=
n
1n(np)
= np33
參考資料:
1. 自 1885 年(除 1940-1946 年外)香港天文台錄得的熱夜日 數,香港天文台
http://www.hko.gov.hk/cis/statistic/hngtday_statistic_c.htm
2. Chauvenet’s Criterion
http://www.spiritus-temporis.com/chauvenet-s-criterion
3. 每月天氣摘要,香港天文台
http://www.hko.gov.hk/wxinfo/pastwx/mwsc.htm
4. 香港度過有紀錄以來最多雨的 6 月,新華網
http://big5.xinhuanet.com/gate/big5/news.xinhuanet.com/ne wscenter/2008-06/27/content_8452165.htm
5. 自 1947 年香港的雷暴日數,香港天文台
http://www.hko.gov.hk/cis/statistic/tsday_statistic_c.htm
6. New Trend Senior Secondary Mathematics, Module 1:
Calculus and Statistics, Chapter 12 Discrete Probability Distributions, Chapter 13 Continuous Random Variables and Normal Distribution, Chapter 14 Parameter Estimation, Chung Tai Educational Press.
34
季軍作品: 得籃板,得天下?
學 校 名 稱 :順德聯誼總會李兆基中學 學 生 姓 名 :煜峻、周嘉豪、梁卓楠
級 別 : 中 五 指 導 老 師 :許俊江老師
引言
我們在日常生活中會遇到很多很特別的人和事,例如一個極 端聰明的人、一場出人意表的球賽、一場意想不到的風暴,
往往都吸引著我們。究竟,突出是好,還是壞呢? 越接近平 均,是平衡,還是平平無奇?!這,就是我們都經常接觸到 的-離群值。
35
(今日係社際籃球既開幕戰,由文社對信社,最後文社以 17 比 5赢了信社)
(Cogor 由籃球場走到 Jack 同 Rabbit 身邊,坐下喝水) Cogor : 啊,真想不到文社竟然赢到這比賽!
Jack : 赢 12 分不算險勝呀!
Cogor : 我們文社連一個籃板都搶不到,竟然能赢得比賽,
真神奇啊!
Jack : 又如何?
Rabbit : 你不知道「得籃板,得天下」嗎,在一場比賽裏 面,主宰籃板的球隊可以說是主宰了勝利。只要成功控制籃 板,就可為隊友製造更加多進攻機會,甚至是防守籃板之後 的快速反擊,這往往是勝負關鍵。
Jack : 真的嗎,我就認為命中率比較重要。
Rabbit : 真的,就像上一季的NBA比賽。取得的籃板數目 和他們勝出的概率是正相關,取得的籃板數目越多,勝出的 概率就越大。你看,就像上季取得最多籃板的公牛一樣,和 湖人、雷霆、馬刺等,都有很高的勝出率,是很好的例子。
36
隊伍 勝負率 籃板數
芝加哥公牛
75.8% 3080
洛杉磯湖人
62.1% 3050
猶他爵士 54.5% 2916
印第安那溜馬 63.6% 2896
明尼蘇達灰狼 39.4% 2886
奧克拉荷馬雷霆
71.2% 2883
費城 76 人 53.0% 2848
丹佛金塊 57.6% 2843
聖安東尼奧馬刺
75.8% 2836
薩哈拉門托帝王 33.3% 2829
而像上季取得很少籃板的山貓一樣,與勇士、籃網、黃蜂 等,都証明取得的籃板數目越少,勝出的概率就越小。
隊伍 勝負率 籃板數
波士頓塞爾特人 59.1% 2560
夏洛特山貓
10.6% 2571
金州勇士
34.8% 2587
底特律活塞
37.9% 2657
布魯克林籃網
33.3% 2662
波特蘭拓荒者 42.4% 2684
紐奧良黃蜂
31.8% 2715
亞特蘭大老鷹 60.6% 2718
洛杉磯快艇 60.6% 2743
邁阿密熱火 69.7% 2746
37
最後,我們就可以得出一個結論,就是籃板數目越多,勝出 的概率就越大,籃板數目同勝出的概率正相關。
Jack : 但是,亦有例外的!就像灰狼、帝王一樣,即使有多 的籃板數目,亦只有低的勝出率;或者像塞爾特人、熱火,
他們有高的勝出率但只有很少籃板數目。如果按照你說,根 據正比關係的線性資料,便可得出預期的勝出率,再找出真 實與預期勝出率的差別,差別越大,便越是離群值。這樣的 話,塞爾特人和熱火應該只有約 30-40% 勝出率,但他們實 際上還比預期多了約 20%;而灰狼、帝王應該有約 50-60%
勝出率,但他們現在卻比預期少了近 20%!這樣如何解 釋,籃板數根本不是和勝出率有絕對關係的!
0.0%
10.0%
20.0%
30.0%
40.0%
50.0%
60.0%
70.0%
80.0%
2500 2600 2700 2800 2900 3000 3100
勝負率
籃板數
38
Cogor : 這就叫做離群值,不是所有數據都有絕對關係的,
所謂的線性只會將所有數據綜合一起畫出一條趨勢線。像塞 爾特人、熱火;灰狼、帝王等特別的球隊,會影響整個趨勢 線,令他的R平方值降低。所謂的R平方值是介於 0 與 1 之 間。R平方值越接近 1,表示籃板數目與勝出的概率相關性 越高;越接近 0,表示籃板數目與勝出的概率相關性越低。
你看,離群值之多令R平方值下降到只有 0.2878,相關性很 小呢!
熱火
帝王 灰狼 塞爾特人
‐30.0%
‐20.0%
‐10.0%
0.0%
10.0%
20.0%
30.0%
2500 2600 2700 2800 2900 3000 3100
實際勝率與預期勝率差
籃板數
39
所以說,自己得到的籃板數目不代表一切,但像剛才社際籃 球比賽一樣,信社奪到我們取不到的籃板球,籃板成功搶奪 率是 100%!
Rabbit : 是的,都要看對方的籃板數量。就如上年NBA的 情況,被對壘隊伍在自己隊伍上取得最多籃板數量的就是山 貓,和巫師、黃蜂、騎士等,都是被對方搶到很多的籃板 球,令勝出率下降。
R² = 0.2878
0.0%
10.0%
20.0%
30.0%
40.0%
50.0%
60.0%
70.0%
80.0%
2500 2600 2700 2800 2900 3000 3100
勝負率
籃板數
40
隊伍 勝負率 籃板數 被搶籃板數
夏洛特山貓
10.6% 2571 3026
華盛頓巫師
30.3% 2750 2971
紐奧良黃蜂
31.8% 2715 2969
克里夫蘭騎士
31.8% 2790 2951
布魯克林籃網 33.3% 2662 2898
薩哈拉門托帝王 33.3% 2829 2887
金州勇士 34.8% 2587 2873
多倫多暴龍 34.8% 2771 2867
底特律活塞 37.9% 2657 2866
明尼蘇達灰狼 39.4% 2886 2851
而被別人搶得最少籃板數量的就如公牛,和馬刺、雷霆、熱 火等,都是給對方搶到很少的籃板球,令勝出率增加。
隊伍 勝負率 籃板數 被搶籃板數
芝加哥公牛
75.8% 3080 2624
聖安東尼奧馬刺
75.8% 2836 2626
奧克拉荷馬雷霆71.2% 2883 2639
邁阿密熱火
69.7% 2746 2641
印第安那溜馬 63.6% 2896 2658
洛杉磯湖人 62.1% 3050 2674
孟斐斯灰熊 62.1% 2775 2683
洛杉磯快艇 60.6% 2743 2688
亞特蘭大老鷹 60.6% 2718 2704
波士頓塞爾特人 59.1% 2560 2716
41
最後,我們又得出一個結論,就是給人搶到籃板數目越少,
勝出的概率就越大,被搶籃板數目和勝出的概率是逆相關。
Jack : 但是,在相若的被搶籃板數下,勝出率也應該相若。
但山貓和其他隊伍,如巫師、黃蜂、騎士等,有著完全不同 的離群距離呢,照道理他們應與山貓差不多只有約 10% 的 勝出率呢,但他們現在比預期多了近 20%,達致約 30%。
0.0%
10.0%
20.0%
30.0%
40.0%
50.0%
60.0%
70.0%
80.0%
2600 2700 2800 2900 3000
勝負率
被搶籃板數
42
(Cogor 與 Rabbit 一時無言而對,互相對視後低頭沉默) Jack : 啊!我想到了。如果把籃板數目與被搶的籃板數目相 除,就可以得出他們真正相對的籃板數目,將離群值減少 呢!
(Cogor 與 Rabbit 聽到後雙眼發亮,仿似等待下一秒的時間 流動)
Jack : 這次由我來說吧。把籃板數目除被搶的籃板數目就可 以得出相對性籃板。之後就可得出一個全新的圖表。
騎士 巫師 黃蜂
山貓
‐8.0%
‐6.0%
‐4.0%
‐2.0%
0.0%
2.0%
4.0%
6.0%
8.0%
10.0%
2600 2700 2800 2900 3000
實際勝率與預期勝率差
被搶籃板數
43
隊伍 勝負率 籃板數 被搶籃板數 相對性籃板
芝加哥公牛
75.8% 3080 2624 1.174
洛杉磯湖人62.1% 3050 2674 1.141
奧克拉荷馬雷霆71.2% 2883 2639 1.092
印第安那溜馬 63.6% 2896 26581.090
聖安東尼奧馬刺75.8% 2836 2626 1.080
猶他爵士 54.5% 2916 27281.069
丹佛金塊 57.6% 2843 27191.046
邁阿密熱火69.7% 2746 2641 1.040
孟斐斯灰熊 62.1% 2775 26831.034
奧蘭多魔術 56.1% 2802 27241.029
達拉斯小牛 54.5% 2822 27561.024
洛杉磯快艇 60.6% 2743 26881.020
費城 76 人 53.0% 2848 27911.020
明尼蘇達灰狼 39.4% 2886 28511.012
亞特蘭大老鷹 60.6% 2718 27041.005
紐約人 54.5% 2755 27620.997
密爾瓦基公鹿 47.0% 2803 28120.997
休士頓火箭 51.5% 2783 27920.997
鳳凰城太陽 50.0% 2752 27920.986
薩哈拉門托帝王33.3% 2829 2887 0.980
多倫多暴龍 34.8% 2771 28670.967
波特蘭拓荒者 42.4% 2684 28250.950
克里夫蘭騎士31.8% 2790 2951 0.945
波士頓塞爾特人 59.1% 2560 27160.943
44
隊伍 勝負率 籃板數 被搶籃板數 相對性籃板
底特律活塞 37.9% 2657 2866
0.927
華盛頓巫師 30.3% 2750 29710.926
布魯克林籃網 33.3% 2662 2898 0.919 紐奧良黃蜂 31.8% 2715 2969 0.914 金州勇士 34.8% 2587 28730.900
夏洛特山貓 10.6% 2571 3026 0.850相對性籃板越高,勝出的概率就越高;相反相對性籃板越 低,勝出的概率就越小。公牛、湖人、雷霆、馬刺、熱火 等,都是相對性籃板很高,自然勝出率就很高;而相反山 貓、黃蜂、籃網、騎士、帝王等,都是相對性籃板很低,所 以勝出率也遠遠低於水平。
故此,最終的結論就是,相對性籃板越高,勝出的概率就越 大,相對性籃板和勝出的概率是正相關。而以這種計算方法 就大大減少了之前所說的離群值,達至更加準確。
45
Rabbit : 你說得對,這就可以減低之前所說的錯誤,離群值 也沒相差得太大呢!雖然依然有像塞爾特人、熱火、湖人、
灰狼、帝王等這些不合群的球隊,但相對之前已經更接近平 均線呢!
0.0%
10.0%
20.0%
30.0%
40.0%
50.0%
60.0%
70.0%
80.0%
90.0%
0.800 0.900 1.000 1.100 1.200
勝負率
相對性籃板
灰狼 湖人 帝王
熱火 塞爾特人
‐20.0%
‐15.0%
‐10.0%
‐5.0%
0.0%
5.0%
10.0%
15.0%
20.0%
25.0%
0.800 0.900 1.000 1.100 1.200
實際勝率與預期勝率差
相對性籃板
46
Cogor : 無 錯 , 你 看 , 離 群 值 小 了 令
R
平 方 值 上 升 至 0.7349,相關性大了很多呢!像剛才的比賽,信社把所有籃 板球搶到,但依然不能擊敗我們,說到底我們文社就是這改 變命運的離群值!其實,我們可以剔除離群值,就可以令R
平方值更高 。但是這就是真實的存在現象嗎?這個世界到 處都存在著離群值,天才與白痴,只會把社會拉開得更遠,但把離群值剔除不計後,是否會產生脫離現實的統計結果 呢?一條死氣沉沉的劃一統計線,又有甚麼意義呢?統計就 是要找出特別的案例,然後加以研究它,找出它異於常人的 原因。
Jack : 嗯,人也要有高低起伏才算得上人生,我寧可做離群 值,讓
R
平方值低,做一個突出的人,也不要像被統一化的 機械人,有著死板的數據。Rabbit : 對,塞爾特人、熱火就是有很高的命中率,來彌補
R² = 0.7349
0.0%
20.0%
40.0%
60.0%
80.0%
100.0%
0.800 0.900 1.000 1.100 1.200
勝負率
相對性籃板
47
他的籃板不足,而灰狼、帝王就是命中率比較低,不能有效 得分。每人也有他的強弱項,離群值正正反映這一點。
(咇!這時下一場社際籃球比賽即將開始,由行社對忠社) Rabbit : 好,就看看相對性籃板是否真的有用!
Cogor, Jack : 可能會出現離群值呢!(看著那行社的籃板王 帶領著整隊參差不齊的隊伍,再看看整隊籃球校隊的忠社) Jack : 忠社,就讓你們成為離群值吧,把
R
平方值拉低也沒 所謂的!Cogor : 才不是呢,籃板王也有決定勝負的一刻!
(Rabbit 看著他們的爭論,笑了笑) Rabbit : 或許,真的會創造奇蹟呢!
48
總結:
離群值暗示世上沒有絕對,而突出也非壞事。即使讓整個
R
平方值下跌,也代表著它的獨特性。相對性籃板的增加令勝 率有一定的把握,但同時離群的隊伍也因此突破此界限突圍 而出,像塞爾特人,是 17 次 NBA 總冠軍,可見籃板亦不 是決定一切,也有例外。而你,是願意做鶴立雞群的那位,還是隨波逐流的人呢?!
49
參考資料:
1. NBA 2011-2012 年度各項統計數字
http://stats.nba.com/leagueTeamGeneral.html?Season=2011- 12&sortField=OPP_REB&sortOrder=ASC&MeasureType=Base
&PerMode=Totals
2. NBA 2011-2012 年度名次及勝出率表
http://www.nba.com/standings/2011/team_record_comparison/c
onferenceNew_Std_Alp.html
50
優異作品:
移宮換羽學 校 名 稱 :循道中學
學 生 姓 名 :吳嘉賢、謝昭進、黃駿泓 級 別 : 中 四
指 導 老 師 :楊錫銘老師
音調上下共廿音,
拍子長短為四拍。
排列組合何其多,
試問總數為幾何?
在 1 個四四拍子的小節中,運用八分音符、四分音符、二分 音符和全音符,所組成的組合有多少?加上每個音符有 20 個音階,每個音又可以在吹奏時加入重音效果,究竟最後會 有多少個組合?
51
「淅瀝淅瀝—」
好像要把夏日煩悶的熱氣趕走似的,雨一直下個不停,沒有 要停下來的跡象。晶瑩剔透的雨點,打落在住宅的玻璃窗上。
屋裡很寧靜,和窗外繁忙的街道形成對比﹔像兩個不同的世 界似的,只聽得見雨的淅瀝聲和鉛筆劃過紙張的「沙沙」聲。
炎熱的天氣下,毫無頭緒的作曲家,不由得感到一點煩躁。
不知為何,就是沒有靈感湧現。看著眼前還未填上的五線譜,
作曲家毅然拿起桌上的十孔口琴,站到窗前吹奏。
「淅瀝淅瀝—」雨點發出清脆的聲響,像奏著一首悅耳動聽 的交響樂。
作曲家忽發其想︰若是十孔口琴的話,一個 4 拍的小節裡,
只用單音,能做出多少個不同的旋律?
「十孔口琴能發出 20 個不同的音,而最快能發出 8 分音 符。我先列出在一個 4 拍的小節裡,運用全音符(1)、2 分音 符(2
1 )、4 分音符(
4
1 )和 8 分音符(
8
1),節奏能有多少個不同 的組合。」作曲家喃喃自語,在計算紙上列出不同的出現模 式,「出現模式裡的音符的次序不同的話,也是可以做出不 同的節奏,所以必須用到階乘(factorial)。
52
由於在一個 4 拍的小節裡,全音符(1)的音符數量只有一個,
所以計算方式是 1!。
但是運用 2 個 2 分音符的話,音符數量有 2 個,不過由於是 2 個相同的音符,所以是
! 2
! 2 。
若是利用 1 個 2 分音符和 2 個 4 分音符的話,音符數量是 3,
不過 4 分音符重複了 2 次,所以是
! 2
! 3 。
如此類推,共有 56 種不同的節奏。(見表一)
53
表一:
出現模式 音符數量 計算方式 總數
1 1 1! 1
1 2
1
2 2 2!
2! 1
1 2
1 4
1
4 3 3!
2! 3
1 2
1 4
1 8
1
8 4 4!
2! 12
1 2
1 8
1 8
1 8
1
8 5 5!
4! 5
1 4
1 4
1 4
1
4 4 4!
4! 1
1 4
1 4
1 4
1 8
1
8 5 5!
3! 2! 10 1
4 1 4
1 8
1 8
1 8
1
8 6 6!
2! 4! 15 1
4 1 8
1 8
1 8
1 8
1 8
1
8 7 7!
6! 7
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1
8 8 8!
8! 1
54
表二:
音符數量 總數
1 1
2 1
3 3 4 13 5 15 6 15 7 7 8 1
作曲家揉了揉眉心,整理出不同音符數量的節奏總數(見表 二)︰「由於十孔口琴能發出 20 個不同的音,即每個音符共 有 20 個不同音階,所以共有 355 億 7010 萬 4420 個不同的 旋律。」
1 20 7 20 15 20 15 20 13 20 3 20 1 20 1
20
1
2
3
4
5
6
7
8
= 35 570 104 420
看著眼前密密麻麻的計算紙,和旁邊毫無進展的五線譜,作 曲家嘆了口氣。一想到繳交新曲的限期將近,心情不禁沉重 了起來,像石頭般重重地壓了下來。
突然靈機一動︰不如加入重音效果?
0 5 10 15
1 2 3 4 5 6 7 8
總數
音符數量
55
「一個音符可分為重音或是不重音。因此,我需在不同出現 模式的情況下,計算擁有不同重音數目的旋律總數,因為必 須運用二項式定理(Binomial theorem)進行計算。」作曲家心 裡如此說道,握著筆飛快地寫下公式。
以下恆等式則是計算帕斯卡 三 角 形 (Pascal's triangle) 中 , 一行的數字之和。由於音符 之間的結合與帕斯卡三角形 排列類似,因此可用此恆等 式計算出不同組合總數。
1
設 為 1, 是音符數量, 是重音數量。
2
則是組合數學(combinatorics)中的概念,可寫為 或 ,公式為 ! ! !
56
在一個 4 拍的小節裡,以 2 個音符數量作例子:
2→2 4 出現組合:
1 2
1 2 1
2 1 2 1
2 1 2 1
2 1 2
*注: 紅色為有重音組合
全音符(1)的音符數量只有一個,只可分為 0 個重音和 1 個 重音,所以計算方式是
2
;2 個 2 分音符則是
4
;1 個 2 分音符和 2 個 4 分音符便是
8。
57
從而得出 表三︰
出現模式 音符數量 計算方式 總數
1 1 2 2
1 2
1 2
2 2 4
1 2
1 4
1 4
3 2 8
1 2
1 4
1 8
1 8
4 2 16
1 2
1 8
1 8
1 8
1 8
5 2 32
1 4
1 4
1 4
1 4
4 2 16
1 4
1 4
1 4
1 8
1 8
5 2 32
1 4
1 4
1 8
1 8
1 8
1 8
6 2 64
1 4
1 8
1 8
1 8
1 8
1 8
1 8
7 2 128
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
8 2 256
58
表四:
音符數量 總數
1 2 2 4 3 8 4 32 5 64 6 64 7 128 8 256
「和之前一樣,十孔口琴能發出 20 個不同的音,所以共有 6 兆 7217 億 4598 萬 5640 個不同的旋律。」
256 20 128 20 64 20 64 20 32 20 8 20 4 20 2
201 2 3 4 5 6 7 8
= 6 721 745 985 640
「相比之下,加了重音後的可能性多了 6 686 175 881 220 個 可能性呢!」
0 40 80 120 160 200 240 280
1 2 3 4 5 6 7 8
總數
音符數量