2020年10月23日金曜日

JSテスト:ferNANDo

program code


delay: ms


input:


output:



2020年10月20日火曜日

StackEdit5-test3

--- title: StackEdit5-test3 ---

Using LaTeX

Inline LaTeX:Γ(z)=0tz1etdt.\LaTeX: \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
Display LaTeX:Γ(z)=0tz1etdt.\LaTeX: \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
Displaystyle LaTeX:Γ(z)=0tz1etdt.\displaystyle \LaTeX: \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.

$ or $$ 囲い
\\( \\), \\[ \\] 囲い(\ がエスケープされるので二重)

Inline \(\LaTeX: \Gamma(z) = \int_0^\infty t^ {z-1}e^ {-t}dt,.\)
Display \[\LaTeX: \Gamma(z) = \int_0^\infty t^ {z-1}e^ {-t}dt,.\]

Written with StackEdit.

StackEditテスト2

マークダウンで書いてBlogger に投稿できるらしいのでテスト(すぐ消す)

Welcome to StackEdit!

Hi! I’m your first Markdown file in StackEdit. If you want to learn about StackEdit, you can read me. If you want to play with Markdown, you can edit me. Once you have finished with me, you can create new files by opening the file explorer on the left corner of the navigation bar.

Files

StackEdit stores your files in your browser, which means all your files are automatically saved locally and are accessible offline!

Create files and folders

The file explorer is accessible using the button in left corner of the navigation bar. You can create a new file by clicking the New file button in the file explorer. You can also create folders by clicking the New folder button.

Switch to another file

All your files and folders are presented as a tree in the file explorer. You can switch from one to another by clicking a file in the tree.

Rename a file

You can rename the current file by clicking the file name in the navigation bar or by clicking the Rename button in the file explorer.

Delete a file

You can delete the current file by clicking the Remove button in the file explorer. The file will be moved into the Trash folder and automatically deleted after 7 days of inactivity.

Export a file

You can export the current file by clicking Export to disk in the menu. You can choose to export the file as plain Markdown, as HTML using a Handlebars template or as a PDF.

Synchronization

Synchronization is one of the biggest features of StackEdit. It enables you to synchronize any file in your workspace with other files stored in your Google Drive, your Dropbox and your GitHub accounts. This allows you to keep writing on other devices, collaborate with people you share the file with, integrate easily into your workflow… The synchronization mechanism takes place every minute in the background, downloading, merging, and uploading file modifications.

There are two types of synchronization and they can complement each other:

  • The workspace synchronization will sync all your files, folders and settings automatically. This will allow you to fetch your workspace on any other device.

    To start syncing your workspace, just sign in with Google in the menu.

  • The file synchronization will keep one file of the workspace synced with one or multiple files in Google Drive, Dropbox or GitHub.

    Before starting to sync files, you must link an account in the Synchronize sub-menu.

Open a file

You can open a file from Google Drive, Dropbox or GitHub by opening the Synchronize sub-menu and clicking Open from. Once opened in the workspace, any modification in the file will be automatically synced.

Save a file

You can save any file of the workspace to Google Drive, Dropbox or GitHub by opening the Synchronize sub-menu and clicking Save on. Even if a file in the workspace is already synced, you can save it to another location. StackEdit can sync one file with multiple locations and accounts.

Synchronize a file

Once your file is linked to a synchronized location, StackEdit will periodically synchronize it by downloading/uploading any modification. A merge will be performed if necessary and conflicts will be resolved.

If you just have modified your file and you want to force syncing, click the Synchronize now button in the navigation bar.

Note: The Synchronize now button is disabled if you have no file to synchronize.

Manage file synchronization

Since one file can be synced with multiple locations, you can list and manage synchronized locations by clicking File synchronization in the Synchronize sub-menu. This allows you to list and remove synchronized locations that are linked to your file.

Publication

Publishing in StackEdit makes it simple for you to publish online your files. Once you’re happy with a file, you can publish it to different hosting platforms like Blogger, Dropbox, Gist, GitHub, Google Drive, WordPress and Zendesk. With Handlebars templates, you have full control over what you export.

Before starting to publish, you must link an account in the Publish sub-menu.

Publish a File

You can publish your file by opening the Publish sub-menu and by clicking Publish to. For some locations, you can choose between the following formats:

  • Markdown: publish the Markdown text on a website that can interpret it (GitHub for instance),
  • HTML: publish the file converted to HTML via a Handlebars template (on a blog for example).

Update a publication

After publishing, StackEdit keeps your file linked to that publication which makes it easy for you to re-publish it. Once you have modified your file and you want to update your publication, click on the Publish now button in the navigation bar.

Note: The Publish now button is disabled if your file has not been published yet.

Manage file publication

Since one file can be published to multiple locations, you can list and manage publish locations by clicking File publication in the Publish sub-menu. This allows you to list and remove publication locations that are linked to your file.

Markdown extensions

StackEdit extends the standard Markdown syntax by adding extra Markdown extensions, providing you with some nice features.

ProTip: You can disable any Markdown extension in the File properties dialog.

SmartyPants

SmartyPants converts ASCII punctuation characters into “smart” typographic punctuation HTML entities. For example:

ASCII HTML
Single backticks 'Isn't this fun?' ‘Isn’t this fun?’
Quotes "Isn't this fun?" “Isn’t this fun?”
Dashes -- is en-dash, --- is em-dash – is en-dash, — is em-dash

KaTeX

You can render LaTeX mathematical expressions using KaTeX:

The Gamma function satisfying Γ(n)=(n1)!nN\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N is via the Euler integral

Γ(z)=0tz1etdt.\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.

You can find more information about LaTeX mathematical expressions here.

Inline LaTeX:Γ(z)=0tz1etdt.\LaTeX: \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
Display LaTeX:Γ(z)=0tz1etdt.\LaTeX: \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.

$ or $$ 囲い
\\( \\), \\[ \\] 囲い(\ がエスケープされるので二重)

Inline \(\LaTeX: \Gamma(z) = \int_0^\infty t{z-1}e{-t}dt,.\)
Display \[\LaTeX: \Gamma(z) = \int_0^\infty t{z-1}e{-t}dt,.\]

UML diagrams

You can render UML diagrams using Mermaid. For example, this will produce a sequence diagram:

AliceBobJohnHello Bob, how are you?How about you John?I am good thanks!I am good thanks!Bob thinks a longlong time, so longthat the text doesnot fit on a row.Checking with John...Yes... John, how are you?AliceBobJohn

And this will produce a flow chart:

Link text
Square Rect
Circle
Round Rect
Rhombus

脚注はつけられますか?

脚注をつける1

スニペットのシンタックスハイライト

class Main{
  void main(String[] args){
    System.out.println("Hello, world!");
  }
}
print(set(input() for _ in range(10)))

ページ内リンク

アンカー


  1. これは脚注です ↩︎

Hello!

Welcome to StackEdit!

Hey! I’m your first Markdown document in StackEdit1. Don’t delete me, I’m very helpful! I can be recovered anyway in the Utils tab of the Settings dialog.


Documents

StackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible offline!

Note:

  • StackEdit is accessible offline after the application has been loaded for the first time.
  • Your local documents are not shared between different browsers or computers.
  • Clearing your browser’s data may delete all your local documents! Make sure your documents are synchronized with Google Drive or Dropbox (check out the Synchronization section).

Create a document

The document panel is accessible using the button in the navigation bar. You can create a new document by clicking New document in the document panel.

Switch to another document

All your local documents are listed in the document panel. You can switch from one to another by clicking a document in the list or you can toggle documents using Ctrl+[ and Ctrl+].

Rename a document

You can rename the current document by clicking the document title in the navigation bar.

Delete a document

You can delete the current document by clicking Delete document in the document panel.

Export a document

You can save the current document to a file by clicking Export to disk from the menu panel.

Tip: Check out the Publish a document section for a description of the different output formats.


Synchronization

StackEdit can be combined with Google Drive and Dropbox to have your documents saved in the Cloud. The synchronization mechanism takes care of uploading your modifications or downloading the latest version of your documents.

Note:

  • Full access to Google Drive or Dropbox is required to be able to import any document in StackEdit. Permission restrictions can be configured in the settings.
  • Imported documents are downloaded in your browser and are not transmitted to a server.
  • If you experience problems saving your documents on Google Drive, check and optionally disable browser extensions, such as Disconnect.

Open a document

You can open a document from Google Drive or the Dropbox by opening the Synchronize sub-menu and by clicking Open from…. Once opened, any modification in your document will be automatically synchronized with the file in your Google Drive / Dropbox account.

Save a document

You can save any document by opening the Synchronize sub-menu and by clicking Save on…. Even if your document is already synchronized with Google Drive or Dropbox, you can export it to a another location. StackEdit can synchronize one document with multiple locations and accounts.

Synchronize a document

Once your document is linked to a Google Drive or a Dropbox file, StackEdit will periodically (every 3 minutes) synchronize it by downloading/uploading any modification. A merge will be performed if necessary and conflicts will be detected.

If you just have modified your document and you want to force the synchronization, click the button in the navigation bar.

Note: The button is disabled when you have no document to synchronize.

Manage document synchronization

Since one document can be synchronized with multiple locations, you can list and manage synchronized locations by clicking Manage synchronization in the Synchronize sub-menu. This will let you remove synchronization locations that are associated to your document.

Note: If you delete the file from Google Drive or from Dropbox, the document will no longer be synchronized with that location.


Publication

Once you are happy with your document, you can publish it on different websites directly from StackEdit. As for now, StackEdit can publish on Blogger, Dropbox, Gist, GitHub, Google Drive, Tumblr, WordPress and on any SSH server.

Publish a document

You can publish your document by opening the Publish sub-menu and by choosing a website. In the dialog box, you can choose the publication format:

  • Markdown, to publish the Markdown text on a website that can interpret it (GitHub for instance),
  • HTML, to publish the document converted into HTML (on a blog for example),
  • Template, to have a full control of the output.

Note: The default template is a simple webpage wrapping your document in HTML format. You can customize it in the Advanced tab of the Settings dialog.

Update a publication

After publishing, StackEdit will keep your document linked to that publication which makes it easy for you to update it. Once you have modified your document and you want to update your publication, click on the button in the navigation bar.

Note: The button is disabled when your document has not been published yet.

Manage document publication

Since one document can be published on multiple locations, you can list and manage publish locations by clicking Manage publication in the menu panel. This will let you remove publication locations that are associated to your document.

Note: If the file has been removed from the website or the blog, the document will no longer be published on that location.


Markdown Extra

StackEdit supports Markdown Extra, which extends Markdown syntax with some nice features.

Tip: You can disable any Markdown Extra feature in the Extensions tab of the Settings dialog.

Note: You can find more information about Markdown syntax here and Markdown Extra extension here.

Tables

Markdown Extra has a special syntax for tables:

Item Value
Computer $1600
Phone $12
Pipe $1

You can specify column alignment with one or two colons:

Item Value Qty
Computer $1600 5
Phone $12 12
Pipe $1 234

Definition Lists

Markdown Extra has a special syntax for definition lists too:

Term 1
Term 2
Definition A
Definition B
Term 3

Definition C

Definition D

part of definition D

Fenced code blocks

GitHub’s fenced code blocks are also supported with Highlight.js syntax highlighting:

// Foo
var bar = 0;

Tip: To use Prettify instead of Highlight.js, just configure the Markdown Extra extension in the Settings dialog.

Note: You can find more information:

  • about Prettify syntax highlighting here,
  • about Highlight.js syntax highlighting here.

Footnotes

You can create footnotes like this2.

SmartyPants

SmartyPants converts ASCII punctuation characters into “smart” typographic punctuation HTML entities. For example:

ASCII HTML
Single backticks 'Isn't this fun?' ‘Isn’t this fun?’
Quotes "Isn't this fun?" “Isn’t this fun?”
Dashes -- is en-dash, --- is em-dash – is en-dash, — is em-dash

Table of contents

You can insert a table of contents using the marker [TOC]:

MathJax

You can render LaTeX mathematical expressions using MathJax, as on math.stackexchange.com:

The Gamma function satisfying is via the Euler integral

Tip: To make sure mathematical expressions are rendered properly on your website, include MathJax into your template:

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>

Note: You can find more information about LaTeX mathematical expressions here.

Inline
Display

$ or $$ 囲い
\\( \\), \\[ \\] 囲い(\ がエスケープされるので二重)

Inline \(\LaTeX: \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt,.\)
Display

UML diagrams

You can also render sequence diagrams like this:

Created with Raphaël 2.1.2AliceAliceBobBobHello Bob, how are you?Bob thinksI am good thanks!

And flow charts like this:

Created with Raphaël 2.1.2StartMy OperationYes or No?Endyesno

Note: You can find more information:

  • about Sequence diagrams syntax here,
  • about Flow charts syntax here.

Support StackEdit


  1. StackEdit is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.
  2. Here is the text of the footnote.

2020年10月19日月曜日

分散が2乗じゃないとどうなるのか

Introduction

分散はなぜ偏差の絶対値ではなく2乗を使うのか。この話題は度々Twitterでもみかけます。
こういうのってちゃんと統計の講義を受けたら説明してもらえるんでしょうかね?筆者は高校でも大学でも統計をちゃんと教わったことがないので実際どうなっているのかわからないのですが、高校生向けの教材を見る限りにおいてはいきなり2乗が出てきて絶対値だとどうなるのかみたいなあまり詳しく扱われていないと思います。ただ、数理統計の教科書を読んでみると結構いろいろなことが書いてあります。
バイト1で必要に迫られちょくちょく調べて得た知見をもとに2乗以外だとどうなるのかということをまとめていきたいと思います。
何かツッコミや質問等ありましたらページ下部のコメントフォームまたはTwitterまでお願いします。

※スマホ版では数式が表示できないためPC版に切り替えて御覧ください。

目次


1. 分散と平均値

ある変数の列 \( X _1, X _2, \ldots, X _n \) 2 があるとします。
このデータをある一つの値 \( \mu \) で代表したとき、その値がどれくらい信頼できるかという指標がほしいですね。代表値と各々のデータの誤差を絶対値として平均する

\( \displaystyle\mathrm{MAE} _\mu=\frac{1}{n}\sum _{i}^n |X _i - \mu| \)

:Mean Absolute Error(平均絶対値誤差) と、2乗した値を平均する

\( \displaystyle\mathrm{MSE} _\mu=\frac{1}{n}\sum _{i}^n (X _i - \mu)^2 \)

:Mean Squared Error(平均二乗誤差) とが考えられます。

誤差が小さい \( \mu \) の方が代表値として嬉しいのでこれらの誤差を最小にする \( \mu \) を考えてみますが、絶対値があると数式的に計算が面倒なので後に回し、まずは \( \mathrm{MSE} \) を計算してみます。

\( \displaystyle \frac{d}{d\mu} \mathrm{MSE} _\mu = \frac{1}{n}\sum _i 2(\mu^2-X _i) = 2\{\mu -(\frac{1}{n}\sum _iX _i)\} \)

より \( \mathrm{MSE} _\mu \) は \( \mu=\frac{1}{n}\sum _iX _i \) のとき極値をとります。導関数が \( \mu \) について1次なので明らかにこれは最小値で、代入すると \( \frac{1}{n}\sum _iX _i^2-(\frac{1}{n}\sum _iX _i)^2 \) を取ることがわかります。
いうまでもなくこれらは(算術)平均値と分散ですね。つまり平均値は平均二乗誤差を最小にするデータの代表値、分散はこれに対するデータの「ばらつき」であるとみなすことができます。
他の統計量と比べ数学的にも扱いやすく、特に正規分布との相性がよく正規分布の仮定をおけばさらに色々な情報が表せるため引っ張りだこな統計量です。

1.1. 不偏推定量

「数学的に扱いやすい」ということを見るため平均と分散の不偏性を確認してみましょう。
推測統計の立場から、上の \( X _1, \ldots, X _n \) をある分布に従う母集団から無作為抽出した確率変数の集合=標本として見ます。この標本から母集団の性質を推定したいというのが推測統計の目的です。
さて、この標本に対する統計量とは \( X _1, \ldots, X _n \) を引数に取る関数であるので抽出に対しランダム性を持っています。このランダムネスに対して取った期待値が「真の値」=母集団の統計量と一致していると嬉しいのでこのような性質を持つ統計量を不偏推定量と呼びます。

詳しい計算は省きます3が、平均値は不偏推定量です。
分散はそのままでは不偏推定量ではありませんが、常に母分散の \( \frac{n-1}{n} \) 倍になっているので \( \frac{n}{n-1} \) 倍してやると不偏推定量になります。

さらに言えば、この期待値についての平均二乗誤差を考えてやるとこれが小さいほど母推定の信頼度が高いと言えます(より有効であるという4)。これは重み付け平均や中央値(中央値が不偏推定量となる場合(母分布が左右対称な場合など)に限る)よりも平均の場合のほうが小さく、この意味でも平均値は有用です。


2. 中央値と平均絶対偏差

前章で飛ばした \( \mathrm{MAE} _\mu \) についても考えていきます。
\( \mathrm{MSE} _\mu \) は \( \mu \) についての\( |\mathrm{1次式}| \)を足し合わせたものなので区分的に1次関数でかつ連続になっています。\( X _1, \ldots, X _n \) を昇順に並び替えたものを \( X’ _1, \ldots, X’ _n \) として、 \( \mu \) を \( \mu=X’ _i (i=1, \ldots, n) \) となる境界値で場合分けしていきます。

\( \mu\le X’ _1 \text{のとき}, \text{傾き}=-n \)
\( X’ _1\le \mu\le X’ _2 \text{のとき}, \text{傾き}=-n+2 \)
\( \vdots \)
(\( n \):偶数のとき)
\( X’ _{n/2-1}\le \mu\le X’ _{n/2} \text{のとき}, \text{傾き}=-2 \)
\( X’ _{n/2}\le \mu\le X’ _{n/2+1} \text{のとき}, \text{傾き}=0 \)
\( X’ _{n/2+1}\le \mu\le X’ _{n/2+2} \text{のとき}, \text{傾き}=2 \)
(\( n \):奇数のとき)
\( X’ _{(n-1)/2}\le \mu\le X’ _{(n+1)/2} \text{のとき}, \text{傾き}=-1 \)
\( X’ _{(n+1)/2}\le \mu\le X’ _{(n+3)/2} \text{のとき}, \text{傾き}=1 \)
\( \vdots \)
\( X’ _n\le \mu \text{のとき}, \text{傾き}=n \)

となるので、連続性から増減を考え
\( \begin{cases}X’ _{n/2}\le \mu \le X’ _{n/2+1}&:n\text{が偶数のとき}\\mu=X’ _{(n+1)/2} &:n\text{が奇数のとき}\end{cases} \)
のときに \( \mathrm{MAE} _\mu \) は最小になります。

偶数のときは幅がありますが、 \( \mu=\frac{X’ _{n/2}+X’ _{n/2+1}}{2} \) はこの範囲内なので、\( \mu \) が中央値のとき \( \mathrm{MAE} _\mu \) は最小になります。これはMean Absolute Deviation(平均絶対偏差)と呼んだりします。(ただし「平均絶対偏差」は\( \mu \)が平均値など他の統計量である場合も指すことがある。つまり”MAD”と言ったときにそれが中央値をを中心とした絶対偏差であるかどうかは文脈による。)


2.1. 中央値不偏推定量

さて、代表値と「ばらつき」を表す統計量が定義されたのでこれを使って母推定を行いたいですね。
結論から言えば中央値は一般には5不偏推定量ではありません。
このnote に標本中央値による推定と母中央値が一致しない具体例が示されている通り、標本中央値は期待値として母集団の性質を反映していません。
しかし、期待値とは確率分布に対する平均値です。中央値が相手の土俵で戦って真価を発揮しないのはある意味当然と言えるでしょう。
上記資料では引き続き「中央値不偏推定量(median-unbiassed estimator)」という推定量を導入しています。標本統計量に対して取る中央値が母推定量であるような統計量を定めたもので、中央値はめでたくこれに該当することがわかります。


2.2. 中央値絶対偏差

ところでMAEの定義には違和感があります。というのも偏差として \( |X _i-\mu| \) を取った後に全体をまとめるときに平均を使っている点です。MAEが中央値と関連しているのならば \( |X _i-\mu| \) の代表値としては中央値をとってもいいはずです。

\( \displaystyle\mathrm{MAE}’ _\mu=\mathrm{median}[ |X _i - \mu|\ (i=1, \ldots, n)] \)

:Median Absolute Error(中央値絶対値誤差) (MAEという略称が被ってしまったので’をつけています)と呼ばれることがあります 6

これが \( \mu=\mathrm{median}[X _i] \) で最小になりかつ中央値不偏統計量になっていてくれると大変きれいですがどうも中央値不偏にはならないようです。だいぶ計算がしんどいので詳しくはまたの機会にしますが、こういう統計的扱いやすさの差が平均・分散との使われ方の差になっているのかなと思います。


3. "0-ノルム"と最頻値

「ばらつき」の定義として偏差の2乗と1乗の場合を見たのでそのままのノリで「0乗」の場合を考えてみましょう。

\( \displaystyle\mathrm{MZE} _\mu=\frac{1}{n}\sum _{i}^n |X _i - \mu|^0 \)

(Mean Zero-norm Error …というものが一般に定義されているわけではなく今名前をつけました。)
ここで「\( x^0 \)」は \( x=0 \) で定義されませんが、便宜的に \( 0^0=0 \) と定義します。
このように定義した \( \sum _{i} |x _i|^0 \) は距離の定義を満たさない7ものの、 \( L^p \)ノルムで \( p\to 0 \) とした極限であるため、"0-ノルム"と呼ばれることがある8そう。なお、本記事の MAE、MADはそれぞれ \( p=1,2 \) の \( L^p \)ノルムに相当します。

この場合、 \( X _i\neq \mu \) のときは \( 1 \) 、 \( X _i=\mu \) のときは \( 0 \) となるので、\( \sum _{i} |X _i - \mu|^0 \) はすなわち \( \# \{ i | X _i \neq \mu \}=n - \# \{i | X _i= \mu \} \) になります。
\( X _i= \mu \) である \( i \) の個数が最大の \( \mu \) とは他ならぬ最頻値のことであり \( \mathrm{MZE} \) は \( \mu \) で最小となります。

これもまた解析がしんどいので今後の課題としますが、中央値と同様、最頻値不偏性(mode-unbiassedness)を導入することもできるようです9


3.1. ∞ノルムでは?

指数を減らした場合があるのなら当然指数を増やしたバージョンも考えられます。
\( p=3,4,\ldots \)と順に考えていけるはずですが、きりがないので一気に \( p\to \infty \) の極限を考えてみます。"0-ノルム"の場合に習って \( L^\infty \) ノルムを考えるとこの場合は \( |x| _\infty=\max\{|x _1|, |x _2|, \ldots \} \) となるので

\( \displaystyle\mathrm{MME} _\mu=\frac{1}{n}\max{|X _i-\mu|} \)

(これもまた造語)
これは \( \mu \) が \( X _i \) の最大値と最小値の中点にある時(これには中点値と名付けられています10)に最小になり、範囲 \( R=\max _i{X _i}-\min _i{X _i} \) として最小値 \( R/2n \) をとります。


4. 「ばらつき」と距離

長くなりましたが以上で見たように、(統計的にどれくらい有用かを別として)様々な「距離」11の定義に応じて「ばらつき」を定義できるが、2乗の場合が一番使いやすそうだということが言えると思います。やはり微分可能であるというのが大きい。

最後に「距離」と統計量の対応をまとめてみます。

代表値 「ばらつき」 対応する「距離」
平均値 分散 \( L^2 \)ノルム (ユークリッド距離)
中央値 平均絶対偏差 \( L^1 \)ノルム (マンハッタン距離)
最頻値 不正解率 “0-ノルム”
中点値 範囲/\( 2n \) \( L^\infty \)ノルム (一様ノルム・チェビシェフ距離)

参考文献

尾畑伸明(2014)『数理統計学の基礎』共立出版
Takayuki Uchiba (2020)「標本中央値は母中央値の不偏推定量か」note https://note.com/utaka233/n/n412b5e6e4c73
@greatonbi (2020)「腑に落ちない人のための不偏性と一致性の解説」 https://qiita.com/greatonbi/items/ec5db93ec70189704c0e
Lp空間 - Wikipedia
Average absolute deviation - Wikipedia


  1. 高校教材の校正業務をしています。最近統計必修化の対応でこの分野の問題が増えてきたためゆとりなんでわかんないですじゃ済まなくなってきて大変です。 ↩︎

  2. この「データ」の扱いかたは立場によって変わってきます。記述統計の立場では表すべき全データ、推測統計の立場では母集団から確率的にサンプリングした標本、ベイズ統計の立場では逆に確率的に母集団パラメータを確率的に定めるデータというようになりますね。ベイズはともかく記述統計と推測統計の用語はしばしば入り交じるのでめちゃくちゃややこしいです。 ↩︎

  3. この記事なんかが実際に実験してみた結果も載っているのでわかりやすいと思います。 ↩︎

  4. 『数理統計学の基礎』p170 ↩︎

  5. 左右対称な分布などでは中央値は平均値と一致し、不偏統計量となる。 ↩︎

  6. https://en.wikipedia.org/wiki/Median_absolute_deviation ↩︎

  7. 斉次性(\( |ax|=a|x| \))を満たさない ↩︎

  8. https://ja.wikipedia.org/wiki/Lp空間#p___の場合 なお、ちゃんと距離の定義を満たす別の「\( L^0 \)ノルム」も存在するそうです。 ↩︎

  9. Sung, Nae-Kyung (1990) “An Optimality Criterion for Median-unbiased Estimators” Journal of the Korean Statistical Society - Sec.3 (読みかけ) ↩︎

  10. https://ja.wikipedia.org/wiki/要約統計量#中点値 ↩︎

  11. 数学的な距離の定義を満たさない"0-ノルム"も含む ↩︎