2021/12/31

Statistics: Covariance 共變異數

對於X和Y兩個隨機變數(random variables),要判斷二者是否有線性關係,可以使用:

1. Covariance 共變異數

2. Correlation Coefficient 相關係數

Covariance 共變異數

對於一個母體的共變異數可表示為σXY = cov(X, Y)

維基百科的圖很清楚地說明,cov(X, Y) > 0 時為正相關,cov(X, Y) < 0時為負相關

cov(X, Y) = E { [X - E(X)] [Y - E(Y)] } = E [ (X - μX) (Y - μX) ] = E(XY) - μXμY

對於散佈圖(Scater Plot)上的點來說,每個點是成對的座標值(xi, yi)

X的變異數是Σ(Xi -μX)2/N,Y的變異數則是Σ(Yi -μY)2/N

因此,X和Y的共變異數是Σ(Xi -μX)(Yi -μY)/N

換句話說,共變異數是每個點的X座標Xi與平均值μX的差,乘以每個點的Y座標Yi與平均值μY的差,相乘後每個點得到一個乘積,再將這N個積加總,最後除以N

===

母體相關係數

ρXY = cov(X, Y)/σXσ= σXYXσY

X和Y的相關係數是二者的共變異數除以二者標準差的積σXσY

參考資料

Covariance (Wikipedia) / 共變異數 (維基百科)

統計學:觀念、理論與方法(二版),賀力行、林淑萍、蔡明春,前程企業,民90,43-47頁

2021/7/16

Tukey, Software, Bit, and FFT

John Tukey (1915-2000)

約翰‧圖基(杜凱)是知名的數學家,在使用統計學的ANOVA(變異數分析)時,很常會用到Tukey post hoc test (事後檢定)。

John Tukey.jpg

在統計學領域,Tukey有許多貢獻,例如盒狀圖(box plot),或稱為盒鬚圖(box-and-whisker plot)。

Box-Plot mit Min-Max Abstand.png

https://en.wikipedia.org/wiki/Box_plot


除了統計學,Tukey還有許多特別的貢獻,例如他發明了資訊方面的新字「Software」(軟體)和「bit」(位元)。

此外,對於訊號處理領域知名的快速傅利葉轉換(Fast Fourier Transform, FFT)來說,Tukey和庫利(James William Cooley, 1926-2016)一起提出了Cooley-Tukey FFT algorithm,是一大貢獻。

統計學家可以與不同領域的學者交流,透過花時間溝通與了解,幫助他們解決統計方面的問題,因此Tukey有一句名言

"The best thing about being a statistician is that you get to play in everyone’s backyard."
作為一名統計學家最棒的一件事,就是你可以去每個人的後院玩耍。

參考資料:

John Wilder Tukey 1973 | National Medal of Science - Mathematics And Computer Science

2021/7/12

Statistics 這個英文字不只是統計學?也是統計量!

談到統計學,對應的英文字自然是Statistics。如果你與我一樣,在讀英文的統計學時讀到Statistics這個字,可是從上下文看來,它指的不是學科、不是統計學這個領域,然後百思不得其解🙄

恭喜你發現英文世界的奧妙!😄 Statistics不只是統計學!

STATISTICS 也可以是統計量!

哇,這樣不是很容易搞混意思嗎?沒錯!所以看英文時要掌握文章脈絡(context,上下文),特別是單複數型態。

先從單數型態來看,statistic這個字是一個統計量(統計值),是可數的,因此它不只可以是一個,也可以是兩個、三個、多個,所以在複數型態時要加上s,因此,就變成了statistics,表示兩個以上的統計量!

所以,單數的statistic前面要加a表示一個,而文法上是單數型態,而statistics則數複數型態,例如:

A statistic is a random variable. (一個統計量是一個隨機變數)

Properties of statistics include completeness, consistency, sufficiency, ... (統計量的屬性包括了完備性、一致性、充分性...) (改自Wikipedia)

回到統計學的部分,就如同其他學科,後面接的字是第三人稱單數型態的be動詞或動詞(加s),例如:

Statistics is a science of analysis (統計學是分析的科學)
Statistics deals with data. (統計學處理著資料)

所以,statistic是只統計量,而statstics除了看上下文,只要清楚句子中的動詞,複數的話就是指好幾個統就量,單數的話通常是指統計學,如此一來,這兩種中文的意思就不難分辨囉!

最後稍微介紹一下統計量,由於統計量是用在統計而不是普查,因此不是直接用在母體(population),而是用在樣本。根據維基百科,統計量就是樣本統計量(sample statistic)

舉例來說,樣本平均數x̅,就是一個統計量。

關於統計量的更多介紹,未來有機會再整理,這個分享就先到這邊囉~

References:

Statistic (Wikipedia)

Basic Statistical Terms 統計學基本名詞 (StudyBME)

2021/3/11

Taxonomic rank 生物分類階元

小時候讀過「界門綱目科屬種」,是林奈體系(Linnaeu's System)的生物分類法(Taxonomic rank),對照英文,原來是這樣:

界 (Kingdom)
門(動物 Phylum/ 植物 Division)
綱(Class)
目(Order)
科(Family)
屬(Genus)
種(Species)

Biological classification L Pengo vflip      Biological classification L Pengo vflip zh


strain 分型 (Wikipedia)

References:

界門綱目科屬種的英文? (Yahoo知識+)

2020/9/21

R Programming Language - Run R Script

To run R script, install RStudio.

Add a new R script file and save it as a *.R file.


The code in the new script file can be:

a = 1

b = 2

a+b

When executing the script file, move the cursor to the first line of the script.

Press the run button, one line is run and the cursor is moved to the next line.

In the above example, press the run button three time for the three lines as below:



Related Information:

Installation and basic R commands

R programming language - load and save data

2020/9/3

R programming language - load and save data

This article explains the commands to load and save R data.

Firstly, declare data x:

    x = c(1,2,3,4,5,6)

Get the local path: getwd()

    path = getwd()

Change path:

    pathnew = file.path(path,"Desktop")

Set the local path: setwd()

    setwd(pathnew)

Save

    filename = file.path(pathnew,"test.RData")

    save(x,file=filename)

Clear workplace

    rm(list=ls())

Load

    filename = file.path(getwd(),"test.RData")

    load(filename)

    > x

    [1] 1 2 3 4 5 6

Related Information:

How to save and run an R Script

Installation and basic R commands

2020/8/18

Installation and Basic R commands

The R Project for Statistical Computing software is available with multiple operating systems such as Windows, MacOS.

It may be downloaded here:

https://www.r-project.org

After installation, try declare values with '=' or '<-' and see the average result with 'mean' function.

> x<-c(1,2,3,4,5)

> mean(x)

[1] 3

> y<-c(2,3,4,5,6,7,8)

> mean(y)

[1] 5

> z=c(5,6,7)

> mean(z)

[1] 6

Result:

To remove the above warning messages, open terminal and type:

defaults write org.R-project.R force.LANG en_US.UTF-8

Reference:

[記宅] 在 Mac 上安裝 R 語言 (R Studio, R) 新手介紹

Related Information:

R programming language - load and save data

How to save and run an R Script

2020/8/1

Hypothesis Testing 假設檢定名詞

hypothesis testing 假設檢定/假說檢定

null hypothesis 虛無假設 H0
alternative hypothesis 對立假設 H1/Ha

analysis ovariances (ANOVA) 變異數分析

E.g. 3 groups with one-way ANOVA
H0: μ1 = μ2 = μ3
H1: μ1 ≠ μ2 ≠ μ3

ANOVA的重點,是求F值:

F =MST/MSE = Mean Square Treatment/Mean Square Error

再和Critical Value CV=f(df1,df2)比較,CV可查f分佈表求得,當F值大於CV時,則拒絕H0

F值表示組間變異(variability between groups)較組內變異(variability within groups)多F倍,因此當F值越大,機率上組間的差異就越大,所以當F值增加至大於CV值時,組間有顯著異。

當F > CV時,組間有顯著差異,但不知道差異是在哪些組之間,因此需要事後檢定(post hoc test)

接著求p value,即在
可針對不同的α值查表求fα(df1,df2),例如f0.05(df1,df2)和f0.01(df1,df2)等數值,即可粗略地得知p值所落在的範圍


p value:
<0 ---="" .05="" br=""><0 ---="" .01="" br=""><0 ---="" .001="" br="">
<0 ---="" .05="" br=""><0 ---="" .01="" br=""><0 ---="" .001="" br="">p<0.05 ---  *     statistically significant
<0 ---="" .05="" br=""><0 ---="" .01="" br=""><0 ---="" .001="" br="">p<0.01 ---  **    statistically highly significant
<0 ---="" .05="" br=""><0 ---="" .01="" br=""><0 ---="" .001="" br="">p<0.001 --- *** statistically extremely significant
<0 ---="" .05="" br=""><0 ---="" .01="" br=""><0 ---="" .001="" br="">
test statistic 檢定統計量

significance level / level of significance 顯著水準 (通常α = 0.05)
- H0發生的機率、拒絕H0的機率、Type I error的機率(不太可能發生)

References

顯著水準 - 基礎統計名詞介紹網頁
Statistical significance (Wikipedia)
Foundations of ANOVA – Assumptions and Hypotheses for One-Way ANOVA (12-3) (Research By Design YouTube)
Mathematical statistics with applications in R, Ramachandran & Tsokos, 2nd edition (2015), p501,

Finding the P-value in One-Way ANOVA (YouTube)

p值的迷思:顯著與非常顯著 研究生2.0

2020/4/18

brain 腦

central nervous system (CNS) 中樞神經系統

cerebrum 大腦
cerebellum 小腦
brainstem/brain stem 腦幹
- midbrain 中腦
- pons 橋腦
- medulla oblongata 延腦

thalamus 視丘/丘腦


skull 頭顱/顱骨/頭骨/腦殼
scalp 頭皮
cortex 皮質

grey matter/gray matter 灰質
white matter 白質

cerebral cortex 大腦皮質

cerebral spinal fluid (CSF) 腦脊髓液

gyrus 回/腦回/腦迴
sulcus 溝
lobe 葉

frontal lobe 額葉
parietal 頂葉
occipital lobe 枕葉
temporal lobe 顳葉

central sulcus 中央溝


Cerebrum lobes.svg
By vectorized by Jkwchui - http://training.seer.cancer.gov/module_anatomy/unit5_3_nerve_org1_cns.htmlCC BY-SA 3.0Link

meninges 腦膜
meningeal veins 腦膜靜脈

1604 Types of Cortical Areas-02.jpg

Diagram from Wikipedia by OpenStax College - Anatomy & Physiology, Connexions Web site. http://cnx.org/content/col11496/1.6/, Jun 19, 2013., CC BY 3.0, Link


參考資訊

腦脊髓液(cerebral spinal fliud, CSF)
Specialized Instruments Brain Areas
Human Brain (Wikipedia)人腦(維基百科)
腦(小小整理網站)

2019/6/5

Excel - Histogram with Standard Deviation Error Bars 直方圖與標準差

The method of drawing the standard deviation range on a histogram in Excel 2019 is shown as below:
使用Excel 2019繪製直方圖與標準差的方法如下:


另外如果最後一個項目是平均值,想要只在它的上面加入標準差的話,以上圖為例,可以將上表前面A, B, C的Standard Deviation項目設定為0,而最後的D的儲存格E3內仍有數值即可。

2017/11/20

electromyogram (EMG) 肌電圖相關名詞

electromyogram (EMG) 肌電圖

motor neuron 運動神經元
motor unit 運動單位
muscle fiber 肌纖維
skeletal muscle fiber 骨骼肌纖維

bicep 二頭肌
tricep 三頭肌
contract 收縮
relax 放鬆

palm 手掌
arm 手臂
elbow 手肘

spinal cord 脊髓
dorsal root ganglion 背根神經節
dorsal horn 背角
ventral 腹角

參考資料

國家教育研究院雙語詞彙、學術名詞暨辭書資訊網

2017/11/9

rapid or slow heart rate / breathing 心跳或呼吸太快/太慢

tachycardia 心跳過速/心搏快速
bradycardia 心跳過緩/心搏徐緩

tachypnea / tachypnoea 呼吸過速/呼吸快速
bradypnea or bradypnoea 呼吸過速/呼吸快速

2017/11/8

brain directional terms 腦的方向名詞

lateral 側的/側面的/橫向的
medial 內側的/中間的

dorsal 背部的/背面的/背側的 => 從上往下,由頭頂往下看
ventral 腹部的/腹面的/腹側的 => 從下往上,由腹部往上看

anterior 前方的/前面的 rostral 前端/喙(ㄏㄨㄟˋ)側
posterior 後方的/後面的 caudal 尾側


參考資料

Anatomical Directional Terms and Body Planes
Basic Brain Info - Directional Terms
單側、雙側、對側的英文名稱 Binaural, Bimodal, Bilateral, Unilateral, Contralateral, Hybrid Hearing

2017/10/13

Kidney 腎臟

kidney 腎/腎臟
renal function 腎功能
nephrology 腎臟學/腎臟科
urinary system 泌尿系統

kidney stones/renal calculi 腎結石

outer renal cortex 外腎皮質
inner renal medulla 內腎髓質

renal vein 腎靜脈
renal artery 腎動脈
renal pyramid 腎錐
renal column 腎柱 - 分開腎錐
major calyx 小腎盞
minor calyx 大腎盞

vasa recta 直血管

renal pelvis 腎盂
ureter 輸尿管

nephron 腎元

superficial nephron 表面腎元
juxtamedullary nephron 近髓質腎元

renal plexus 腎神經叢

renal corpuscle 腎球/腎小體
glomerulus 腎絲球/腎小球
glomerular capsule/capsula glomeruli/Bowman's capsule/Bowman capsule 腎絲球囊/腎小球囊/鮑氏囊
proximal tubule/proximal convoluted tubule 近端小管/近曲小管
Loop of Henle 亨利氏環
distal tubule/distal convoluted tubule (DCT) 遠端小管/遠曲小管
collection duct 集尿管
macula densa 緻密斑

afferent arteriole 入球小動脈
efferent arteriole 出球小動脈

filtration 過濾
reabsorption 再吸收
secretion 分泌
excretion 排洩/排出
excretion = filtration + secretion - reabsorption

osmosis 滲透

renal plasma 腎血漿

renin 腎素
urea 尿素

參考資料

小小整理網站:
腎臟(kidney)
腎小球(Renal corpuscle)
腎絲球過濾率(glomerular filtration rate, GFR)
腎素-血管收縮素-醛固酮系統
逆流機制(The Countercurrent Mechanism)

2017/6/10

Common-Mode Rejection Ratio (CMRR)

common mode rejection ratio 共模排斥比/共模斥拒比

Ad = differential gain
Acm = common-mode gain

CMRR = 20log10|Ad/Acm|

References:

Common-mode rejection ratio(Wikipedia)
國家教育研究院雙語詞彙、學術名詞暨辭書資訊網
生物醫學工程導論(中華民國生物醫學工程學會,滄海2008) p117

2017/6/1

Fingers 手指

thumb 拇指
index finger/forefinger/pointer finger 食指
middle finger/long finger 中指
ring finger 無名指
little finger/pinky finger/small finger/digit finger 小指

Reference

Hand (Wikipedia)

2017/3/28

Biomedical Electrode and Electrolyte 生醫電極與電解液

electrode 電極
electrolyte 電解液、電解質

Current Carriers:

Human body - ions
Wire - electrons
Transducer - electrodes

Note: Electrodes work as transducers, not conductors.

Atom 原子相關名詞

atom 原子

proton 質子
electron 電子
neutron 中子

charge 電荷

ion 離子

proton - positive charge
electron - negative charge
neutron - no charge

ion - atom with +ve/-ve charge e.g. Na+, K+

valence 價
valence 價電子 e,g, Na: 1, Ca: 2

相關資訊:

Common Chemical Elements in Electrophysiology 電生理學中常見的化學元素
Valence electron (Wikipedia)

2017/3/19

Neuron 神經元

neuron/nerve cell 神經元/神經細胞

nucleus 細胞核
soma 細胞本體 cell body

dendrite 樹突/樹狀突
axon / nerve fiber 軸突/軸索/神經纖維
axon hillock 軸丘 (hillock = 崗/丘)
axon terminal 軸突末端/軸突末稍

myelin sheath 髓鞘

synapse 突觸 (Wikipedia) - junction between two neurons
axon terminal + synaptic cleft + dendrite
chemical synapse
electrical synapse

synaptic vesicle 突觸囊泡/突觸小泡
synaptic cleft/gap 突觸間隙/突觸空隙
postsynaptic receptor 突觸後受器

Blausen 0657 MultipolarNeuron.png

Diagram from Wikipedia by BruceBlaus - Own work, CC BY 3.0, Link

neurotransmitter 神經傳導物/神經傳遞物

postsynaptic potential 突觸後電位
excitatory postsynaptic potential(EPSP) 興奮性突觸後電位
inhibitory postsynaptic potential(IPSP) 抑制性突觸後電位

References:

用十分鐘理解 《神經網路發展史》
生物醫學工程導論(中華民國生物醫學工程學會,滄海2008) p8, 11-13
突觸後電位