CC Wang
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    統計學(二)- 唐麗英(管院) === `NCTU` `IEM` # Syllabus - 這門課是Applied Statistics!!想要知道一堆公式推導的大神們,請選擇應數系「統計學(下學期開課)」、「高等統計學(上學期開課)」。 - 參考書目 - 上課用書 Introduction to Probability and Statistics 14/e (Mendenhall, Beaver, Beaver) - 建議閱讀 (樓上那本有時候講得太簡略,以下按推荐順序排列) - Mathematical Statistics and Data Analysis 3/e (John A. Rice) (Mathematical Statistics第一順位用書) - Introduction to Mathematical Statistics 7/e (Hogg, McKean, Craig) (Mathematical Statistics第二順位用書) - Fundamentals of Probability with Stochastic Processes 3/e (Saeed Ghahramani) (資工系Probability用書) - 老師超級親切,課程品質非常高,可以學會怎麼應用在生活中,加簽必須第一天就要去。 - 上課使用老師自製講義,搞清楚內容考試就90分無難度。 - 期末學期成績可得極高分,這一門3學分的課。 - 總共3次大型考試,第二次期中考是三個老師共同出題,學期中有若干次小考。 - 每個章節都要交手寫習題作業。可以做小組project當作加分用,題目自訂。 # Course ## Chapter 9~10 Test of Hypothesis:Part A - Concept test of hypothesis(假說檢定)主要目的 1. 採集樣本資訊 2. 使用統計工具產生數值指標 3. 下結論,告訴我們到底要不要相信假說 基本上,test of hypothesis就是一種使用統計的SOP :::danger Five Steps for Test of Hypothesis (整學期會反覆應用,請務必宇宙級精熟) 1. Set up **Null Hypothesis** $H_0$ and **Alternative Hypothesis** $H_a$ 2. Choose the **Level of Significance** $\alpha$ 3. Calculate the **Test Statistics** 4. Choose the **Rejection Region** 5. Make a conclusion that is either **Reject $H_0$** or **Don't Reject $H_0$** ::: 接下來,我們來逐一詳細了解以上五步驟在幹嘛 `1.` Set up **Null Hypothesis** $H_0$ and **Alternative Hypothesis** $H_a$ Null Hypothesis $H_0$:the hypothesis against $H_a$ Alternative Hypothesis $H_a$:the hypothesis that we hope to support and become the truth :::success **答題小技巧** 1. $H_a$只會出現$>$、$\neq$、$<$這三種關係符號 2. 把題幹敘述的疑問句變成肯定句就是$H_a$ 3. 題幹出現「claim that」字樣,$H_a$就是反對那個claim 4. 研究者做這麼多工作,就只是為了證明$H_a$是真的! ::: `2.`Choose the **Level of Significance** $\alpha$ Type I Error:Reject $H_0$ when it's actually true. Type II Error:Do not reject $H_0$ when it's actually false. The probability of committing **Type I Error** is $\alpha$. The probability of committing **Type II Error** is $\beta$. 通常我們會把$\alpha$設立為5%,也可以是1%、10%或是其他任意數值。 `3.`Calculate the **Test Statistics** 開始按計算機,算一堆mean、standard error、$z$、$t$、${\chi}^2$、$f$之類的值。 視乎做何種檢定而有不同的值要計算,公式忘了要回去翻以前的章節。 `4.`Choose the **Rejection Region** Rejection Region (R.R.)白話的說就是region of rejecting $H_0$。 因為test of hypothesis會套用一種distribution model,所以會把$H_a$的boundary轉成那一個distribution model之下的值,稱作**Critical Value**。 **One-tailed Test** - Left-tailed Test:$H_a$內含$<$ - Right-tailed Test:$H_a$內含$>$ 例如$H_a: \mu > 1000$畫成圖就是這樣: ![H_a RT Number Line](https://i.imgur.com/raeHruj.png) 斜線部分表示如果$H_a$成真,代表samples出現在那個區域 **Two-tailed Test** $H_a$內含$\neq$,例如$H_a: \mu \neq 1000$畫成圖就是這樣: ![H_a TT Number Line](https://i.imgur.com/RHDObpS.png) 斜線部分表示如果$H_a$成真,代表samples出現在那個區域 `5.`Make a conclusion that is either **Reject $H_0$** or **Don't Reject $H_0$** 看看test statistics有無落在R.R.裡面,這樣子就知道要不要reject $H_0$了;也可以利用**p-value**和**power of the test**來綜合判斷要不要降低或者調高 $\alpha$ [**p-value**](https://en.wikipedia.org/wiki/P-value) [**power of the test**](https://en.wikipedia.org/wiki/Statistical_power) EXAMPLE: :::info Philips的廣告宣稱:所有貼有公司保固貼紙的燈泡,都具有5000小時以上的使用壽命。CFCT的研究員想要了解到底有沒有廣告不實,所以隨機到各個大賣場購買20個Philips的燈泡作為樣本,並且連續使用直到無法發出亮光。 測試結果如表格A,請問:請使用假說檢定法,判定Philips是否屬實? ![Table A](https://i.imgur.com/twNI9ZG.png) 1. Hypothesis: $H_0: \mu_{life \ of \ bulbs} \geq 5000$ $H_a: \mu_{life \ of \ bulbs} < 5000$ 2. $\alpha = 5 \%$ 3. Test statistics: $\bar{X} = 4995.8$、$s = 24.2$ Apply Student's t-test. $\therefore t = \frac{\bar{X} - \mu_0}{s/\sqrt{n}} \approx -0.776$ 4. Right-tailed Test: $\nu = 19$ $critical \ value = -1.729$ $p$-$value \approx 22.4 \%$ 5. Conclusion: Do not reject $H_0$, so we don't have sufficient evidence to say that the claim in the advertisement is not truth. ::: 上面的例子有看不懂的部分,接下來的章節會一一補齊,只需要熟悉步驟順序以及內容就好。 ## Chapter 9~10 Test of Hypothesis:Part B - Test Models ### Case 1:SINGLE Populations 以下**Five Steps**全部一樣,只有test statistics需要使用不同的model - Test of $\mu$, when we have known $\sigma^2$ Apply [**standard normal distribution**](https://en.wikipedia.org/wiki/Normal_distribution#Standard_normal_distribution). $Z = \frac{\bar{X} - \mu_0}{\sigma/\sqrt{n}}$ , where $\mu_0$ is the null-hypothesized value of mean - Test of $\mu$, when we have **NOT** known $\sigma^2$ Apply [**student's t distribution**](https://en.wikipedia.org/wiki/Student%27s_t-distribution). $t = \frac{\bar{X} - \mu_0}{s/ \sqrt{n}}$ , where $\nu = n-1$ and $n$ is the sample size - Test of $P$ Apply [**standard normal distribution**](https://en.wikipedia.org/wiki/Normal_distribution#Standard_normal_distribution). $Z = \frac{\hat{p} - P_0}{\sqrt{\frac{P_0(1-P_0)}{n}}}$ where $P_0$ is the null-hypothesized value of "success" proportion in Bernoulli trial - Test of $\sigma^2$ Apply [**chi-squared distribution**](https://en.wikipedia.org/wiki/Chi-squared_distribution). $\chi^2 = \frac{(N-1)s^2}{\sigma^2_0}$, where $\sigma^2_0$ is the null-hypothesized value of variance and $\nu = n-1$ ### Case 2:TWO INDEPENDENT Populations 以下**Five Steps**全部一樣,只有hypothesis要小調整和test statistics需要使用不同的model - Test of $\mu_1- \mu_2$, when we have known $\sigma^2_1$ and $\sigma^2_2$ (Cat.A) $H_0: \mu_1- \mu_2$ ==$\geq \ = \ \leq$== $\delta_0$ $H_a: \mu_1- \mu_2$ ==$< \ \neq \ >$== $\delta_0$ where $\delta_0$ is the null-hypothesized difference of two [parameters](https://en.wikipedia.org/wiki/Parameter#Statistics_and_econometrics) Apply [**standard normal distribution**](https://en.wikipedia.org/wiki/Normal_distribution#Standard_normal_distribution). ![two means test with known sigma](https://i.imgur.com/UVRqyjt.png) - Test of $\mu_1- \mu_2$, when we have NOT known $\sigma^2_1$ and $\sigma^2_2$ - Case of assumption **$\sigma^2_1 = \sigma^2_2$** (Cat.B) $H_0: \mu_1- \mu_2$ ==$\geq \ = \ \leq$== $\delta_0$ $H_a: \mu_1- \mu_2$ ==$< \ \neq \ >$== $\delta_0$ Apply [**student's t distribution**](https://en.wikipedia.org/wiki/Student%27s_t-distribution). ![two means test with unknown same sigmas](https://i.imgur.com/1afkk5t.png) where ![pooled sample variance](https://i.imgur.com/DdHGoa4.png) and $\nu = (n_1-1)+(n_2-1)$ - Case of assumption **$\sigma^2_1 \neq \sigma^2_2$** (Cat.C) $H_0: \mu_1- \mu_2$ ==$\geq \ = \ \leq$== $\delta_0$ $H_a: \mu_1- \mu_2$ ==$< \ \neq \ >$== $\delta_0$ Apply [**student's t distribution**](https://en.wikipedia.org/wiki/Student%27s_t-distribution). ![two means test with unknown different sigmas](https://i.imgur.com/FyGhIow.png) where $\nu = \frac{(A+B)^2}{\frac{A^2}{(n_1-1)}+\frac{B^2}{(n_2-1)}}$ and $A=\frac{s^2_1}{n_1}$ is $SE(\bar{X_1})$ and $B=\frac{s^2_2}{n_2}$ is $SE(\bar{X_2})$ - Test of $P_1-P_2$ - Case of zero null hypothesis $H_0: P_1- P_2$ ==$\geq \ = \ \leq$== $0$ $H_a: P_1- P_2$ ==$< \ \neq \ >$== $0$ Apply [**standard normal distribution**](https://en.wikipedia.org/wiki/Normal_distribution#Standard_normal_distribution). ![two p test with pool sigmas](https://i.imgur.com/ECETUvm.png) where ![pool sigmas](https://i.imgur.com/MpXRQkR.png) and $X_1$ is the number of "success" events in Bernoulli trial - Case of nonzero null hypothesis $H_0: P_1- P_2$ ==$\geq \ = \ \leq$== $\delta_0$ $H_a: P_1- P_2$ ==$< \ \neq \ >$== $\delta_0$ Apply [**standard normal distribution**](https://en.wikipedia.org/wiki/Normal_distribution#Standard_normal_distribution). ![two p test without pool sigmas](https://i.imgur.com/imtogTH.png) - Test of $\frac{\sigma^2_1}{\sigma^2_2}$ $H_0: \sigma_1$ ==$\geq \ = \ \leq$== $\sigma_2$ $H_a: \sigma_1$ ==$< \ \neq \ >$== $\sigma_2$ Apply [**Fisher–Snedecor distribution**](https://en.wikipedia.org/wiki/F-distribution). $F = \frac{s^2_1}{s^2_2}$, where $(\nu_1, \ \nu_2) = (n_1-1, \ n_2-1)$ ### Case 3:TWO DEPENDENT Populations 以下**Five Steps**全部一樣,只有test statistics需要使用不同的model ### Flow Chart for Test of $\mu_1-\mu_2$ ![flow chart for test of difference of mu](https://i.imgur.com/6RyibYM.png) ## Chapter 11 The Analysis of Variance (ANOVA) ### Part A:CRD ANOVA ### Part B:RDB ANOVA ## Chapter 12 Linear Regression and Correlation Analysis # Homework # Exam

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully