為什么隨機性是信息

用位思考 (Thinking in terms of Bits)

Imagine you want to send outcomes of 3 coin flips to your friend's house. Your friend knows that you want to send him those messages but all he can do is get the answer of Yes/No questions arranged by him. Let's assume the arranged question: Is it head? You will send him the sequence of zeros or ones as an answer to those questions which is commonly known as a bit(binary digit). If Zero represents No and one represents Yes and the actual outcome of the toss was Head, Head, and Tail. Then you would need to send him 1 1 0 to convey your facts(information). so it costs us 3 bits to send those messages.

我想像一下,您想將3次硬幣翻轉的結果發送到您朋友的房子。 您的朋友知道您想向他發送這些消息,但是他所能做的就是得到他安排的是/否問題的答案。 讓我們假設一個安排好的問題:是頭嗎? 您將把零或一的序列發送給他,作為對這些問題的解答(通常稱為位(二進制數字))。 如果零代表否,一個代表是,并且折騰的實際結果是頭,頭和尾。 然后,您需要向他發送1 1 0來傳達您的事實(信息)。 因此發送這些消息要花費我們3位。

How many bits does it take to make humans?

做一個人需要多少位?

Our entire genetic code is contained in a sequence of 4 states T, A, G, C in DNA. Now we would need 2 bits (00,01,10,11) to encode these states. And multiplied by 6 billion letters of genetic code in the genome yields 1.5 GB of information. So we can fit our entire genetic code on a single DVD.

我們的整個遺傳密碼包含在DNA的4種狀態T,A,G,C中。 現在我們將需要2位(00,01,10,11)來編碼這些狀態。 乘以基因組中60億個字母的遺傳密碼可產生1.5 GB的信息。 因此,我們可以將整個遺傳密碼放在一張DVD中。

多少信息? (How much Information?)

Suppose I flip a fair coin with a 50% chance of getting head and a 50% chance of getting tails. Similarly now instead of a fair coin, I flip a biased coin with head on both sides. What do you think in which case I am more certain about the outcome of the toss? Obviously the answer would be a biased coin. It is because in the case of the fair coin I am uncertain about the outcome because none of the possibilities are more likely to happen than the other while in biased coin I am not uncertain about the outcome because I know I will get heads.

小號 uppose我翻轉一個公平的硬幣獲得頭部的幾率為50%和獲得尾巴的幾率為50%。 現在,類似地,我用偏頭硬幣在兩頭都翻轉而不是公平的硬幣。 在這種情況下,您認為我對投擲的結果有何把握? 答案顯然是有偏見的。 這是因為在公平硬幣的情況下,我不確定結果,因為沒有一種可能性比另一種可能性更大;而在有偏見的硬幣中,我不確定結果,因為我知道我會獲得正面的。

Let's look at the other way. Would you be surprised if I told you the coin with head on both sides gave head as an outcome? No. Because you did not learn anything new with that statement. Outcomes did not give you any further information. On the other hand, when the coin is fair you have the least knowledge of what will happen next. So each toss gives you the new information.

讓我們看看另一種方式。 如果我告訴您兩側都帶硬幣的硬幣作為結果給了您,您會感到驚訝嗎? 不。因為您沒有從該聲明中學到任何新知識。 結果未提供任何進一步的信息。 另一方面,當代幣公平時,您對接下來將要發生的事情的了解最少。 因此,每次折騰都會為您提供新的信息。

So the intuition behind quantifying information is the idea of measuring how much surprise there is in an event. Those events that are rare (low probability) are more surprising and therefore have more information than those events that are common (high probability).

因此,量化信息背后的直覺是測量事件中有多少驚喜的想法。 那些罕見的事件(低概率)比那些常見的事件(高概率)更令人驚訝,因此具有更多的信息。

Low Probability Event: High Information (surprising)

低概率事件 :高信息( 令人驚訝)

High Probability Event: Low Information (unsurprising)

高概率事件 :低信息( 不足為奇 )

As a prereqisite, If you want to learn about basic probability theory, I wrote about that here.

作為先決條件,如果您想了解基本概率論,我在這里寫過。

So information seems to be randomness. So if we want to know how much information does something contains we need to know how random and unpredictable it is. Mathematically, Information gained by observing an event X with probability P is given by:

因此,信息似乎是隨機的。 因此,如果我們想知道某物包含多少信息,就需要知道它是多么隨機和不可預測。 在數學上, 通過觀察概率為P的事件X獲得的信息由下式給出

Image for post

By plugging the values in the formula, we can clearly see information contained in certain events like observing head by tossing a coin with heads on both sides is 0 while the uncertain event leads to more information after it is observed. So this definition satisfies the basic requirement that it is a decreasing function of p.

通過插入公式中的值,我們可以清楚地看到某些事件中包含的信息,例如通過擲一個硬幣,使硬幣的正反兩面都是正面,而觀察正面,則不確定事件會導致更多信息。 因此,該定義滿足了它是p的遞減函數的基本要求。

But You may have the question …………..

但是您可能有一個問題…………..

Why the logarithmic function?

為什么是對數函數?

And what is the base of the logarithm?

對數的底是什么?

As an answer to the second question, You can use any base of the logarithm. In information theory, we use base 2 in which case the unit of information is called a bit.

作為第二個問題的答案,您可以使用任何對數的底數。 在信息論中,我們使用以2為底的情況,在這種情況下,信息的單位稱為位。

The answer to the first question is that the resulting definition has several elegant resulting properties, and it is the simplest function that provides these properties. One of these properties is additivity. If you have two independent events (i.e., events that have nothing to do with each other), then the probability that they both occur is equal to the product of the probabilities with which they each occur. What we would like is for the corresponding information to add up.

第一個問題的答案是,生成的定義具有多個優美的生成屬性,而這是提供這些屬性的最簡單函數。 這些屬性之一是可加性 。 如果您有兩個獨立的事件(即彼此無關的事件),則它們都發生的概率等于它們各自發生的概率的乘積我們希望將相應的信息加起來。

For instance, the event that it rained in Kathmandu yesterday and the event that the number of views in this post is independent, and if I am told something about both events, the amount of information I now have should be the sum of the information in being told individually of the occurrence of the two events.

例如,昨天在加德滿都下雨的事件,以及該帖子中的視圖數量是獨立的事件,并且如果被告知有關這兩個事件的信息,那么我現在擁有的信息量應該是被分別告知兩個事件的發生。

The logarithmic definition provides us with the desired additivity because given two independent events A and B

對數定義為我們提供了所需的可加性,因為給定了兩個獨立的事件A和B

Image for post

(Entropy)

Entropy is the average(expected) amount of information conveyed by identifying the outcome of some random source.

?ntropy是信息的平均(預期)量傳送通過識別一些隨機源的結果。

Image for post

It is simply the sum of several terms, each of which is the information of a given event weighted by the probability of that event occurring.

它只是幾項的總和,每一項都是給定事件的信息,由該事件發生的概率加權。

Like information, it is also measured in bits. If we use log?2?? for our calculation we can interpret entropy as the number of bits it would take us on average to encode our information.

像信息一樣,它也以位為單位。 如果我們使用l og 2進行計算,我們可以將熵解釋為編碼我們的信息平均需要的位數。

In the important special case of two mutually exclusive events (i.e., exactly one of the two events can occur), occurring with probabilities p and 1 ? p, respectively, the entropy is:

在兩個互斥事件的重要特殊情況下(即恰好可以發生兩個事件之一),它們分別以概率p和1-p發生,熵為:

Image for post

帶走 (Takeaway)

  • Information is randomness. The more uncertain we are about the outcome of an event the more information we will get after observing an event.

    信息就是隨機性。 我們對事件的結果越不確定,觀察事件后我們將獲得更多的信息

  • The equation for calculating the range of Entropy: 0 ≤ Entropy ≤ log(n), where n is the number of outcomes

    計算熵范圍的公式:0≤熵≤log(n),其中n是結果數
  • Entropy 0(minimum entropy) occurs when one of the probabilities is 1 and the rest are 0’s.

    當其中一個概率為1且其余概率為0時,發生熵0(最小熵)。
  • Entropy log(n)(maximum entropy) occurs when all the probabilities have equal values of 1/n.

    當所有概率都具有等于1 / n的值時,就會出現熵log(n)(最大熵)。

翻譯自: https://medium.com/@regmi.sobit/why-randomness-is-information-f2468966b29d

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/389898.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/389898.shtml
英文地址,請注明出處:http://en.pswp.cn/news/389898.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Chrome無法播放m3u8格式的直播視頻流的問題解決

出國,然后安裝這個插件即可:Native HLS Playback https://chrome.google.com/webstore/detail/native-hls-playback/emnphkkblegpebimobpbekeedfgemhof?hlzh-CN轉載于:https://www.cnblogs.com/EasonJim/p/8737001.html

大數據相關從業_如何在組織中以數據從業者的身份閃耀

大數據相關從業Build bridges, keep the maths under your hat and focus on serving.架起橋梁,將數學放在腦海中,并專注于服務。 通過協作而不是通過孤立的孤島來交付出色的數據工作。 (Deliver great data work through collaboration not through co…

暑假周總結六

本周開始了做網站的商品展示和商品查詢的功能,基本功能已完成了。平均每天花4到5個小時進行學習和編碼 這周學習了lucene分詞器,但是雖然學了一些這些方面的東西,但是查詢的時候效果還是不行,還是繼續學習 一些更好處理關鍵字的方…

Django進階之中間件

中間件簡介 在http請求 到達視圖函數之前 和視圖函數return之后,django會根據自己的規則在合適的時機執行中間件中相應的方法。 中間件的執行流程 1、執行完所有的request方法 到達視圖函數。 2、執行中間件的其他方法 2、經過所有response方法 返回客戶端。 注意…

漢諾塔遞歸算法進階_進階python 1遞歸

漢諾塔遞歸算法進階When something is specified in terms of itself, it is called recursion. The recursion gives us a new idea of how to solve a kind of problem and this gives us insights into the nature of computation. Basically, many of computational artifa…

500. 鍵盤行

500. 鍵盤行 給你一個字符串數組 words ,只返回可以使用在 美式鍵盤 同一行的字母打印出來的單詞。鍵盤如下圖所示。 美式鍵盤 中: 第一行由字符 “qwertyuiop” 組成。 第二行由字符 “asdfghjkl” 組成。 第三行由字符 “zxcvbnm” 組成。 示例 1&a…

windows 停止nginx

1、查找進程 tasklist | findstr nginx2、殺死進程 taskkill /pid 6508 /F3、一次殺死多個進程taskkill /pid 6508 /pid 16048 /f轉載于:https://blog.51cto.com/dressame/2161759

SpringBoot返回json和xml

有些情況接口需要返回的是xml數據&#xff0c;在springboot中并不需要每次都轉換一下數據格式&#xff0c;只需做一些微調整即可。 新建一個springboot項目&#xff0c;加入依賴jackson-dataformat-xml&#xff0c;pom文件代碼如下&#xff1a; <?xml version"1.0&quo…

575. 分糖果

575. 分糖果 給定一個偶數長度的數組&#xff0c;其中不同的數字代表著不同種類的糖果&#xff0c;每一個數字代表一個糖果。你需要把這些糖果平均分給一個弟弟和一個妹妹。返回妹妹可以獲得的最大糖果的種類數。 示例 1:輸入: candies [1,1,2,2,3,3] 輸出: 3 解析: 一共有三…

如何開啟并配置CITRIX Xenserver的SNMP服務

以下博文轉載至虛擬人生Citrix Xenserver使用標準的NET-SNMP協議&#xff0c;關于NET-SNMP請參考www.net-snmp.org. Xenserver并沒有自己的MIB庫.Xenserver默認是禁止SNMP服務且并沒有開啟SNMP服務使用的端口,通過以下方式開啟并配置SNMP服務&#xff1a;1.編輯Xenserver的/etc…

orange 數據分析_使用Orange GUI的放置結果數據分析

orange 數據分析Objective : Analysing of several factors influencing the recruitment of students and extracting information through plots.目的&#xff1a;分析影響學生招生和通過情節提取信息的幾個因素。 Description : The following analysis presents the diffe…

C++(1)引用

引用 引用 為對象起另外一個名字&#xff0c;通過將聲明符寫成 &d&#xff0c;其中d是聲明的變量名。一旦初始化完成&#xff0c;引用將和起初始值綁定在一起&#xff0c;無法再綁定到另一個對象&#xff0c;因此引用必須初始化。 引用就是別名&#xff0c;初始化以后&am…

普里姆從不同頂點出發_來自三個不同聚類分析的三個不同教訓數據科學的頂點...

普里姆從不同頂點出發繪制大流行時期社區的風險群圖&#xff1a;以布宜諾斯艾利斯為例 (Map Risk Clusters of Neighbourhoods in the time of Pandemic: a case of Buenos Aires) 介紹 (Introduction) Every year is unique and particular. But, 2020 brought the world the …

一步一步圖文介紹SpriteKit使用TexturePacker導出的紋理集Altas

1、為什么要使用紋理集&#xff1f; 游戲是一種很耗費資源的應用&#xff0c;特別是在移動設備中的游戲&#xff0c;性能優化是非常重要的 紋理集是將多張小圖合成一張大圖&#xff0c;使用紋理集有以下優點&#xff1a; 1、減少內存占用&#xff0c;減少磁盤占用&#xff1b; …

BZOJ.1007.[HNOI2008]水平可見直線(凸殼 單調棧)

題目鏈接 可以看出我們是要維護一個下凸殼。 先對斜率從小到大排序。斜率最大、最小的直線是一定會保留的&#xff0c;因為這是凸殼最邊上的兩段。 維護一個單調棧&#xff0c;棧中為當前可見直線(按照斜率排序)。 當加入一條直線l時&#xff0c;可以發現 如果l與棧頂直線l的交…

荷蘭牛欄 荷蘭售價_荷蘭的公路貨運是如何發展的

荷蘭牛欄 荷蘭售價I spent hours daily driving on one of the busiest motorways in the Netherlands when commuting was still a norm. When I first came across with the goods vehicle data on CBS website, it immediately attracted my attention: it could answer tho…

Vim 行號的顯示與隱藏

2019獨角獸企業重金招聘Python工程師標準>>> Vim 行號的顯示與隱藏 一、當前文檔的顯示與隱藏 1 打開一個文檔 [rootpcname ~]# vim demo.txt This is the main Apache HTTP server configuration file. It contains the configuration directives that give the s…

結對項目-小學生四則運算系統網頁版項目報告

結對作業搭檔&#xff1a;童宇欣 本篇博客結構一覽&#xff1a; 1&#xff09;.前言(包括倉庫地址等項目信息) 2&#xff09;.開始前PSP展示 3&#xff09;.結對編程對接口的設計 4&#xff09;.計算模塊接口的設計與實現過程 5&#xff09;.計算模塊接口部分的性能改進 6&…

367. 有效的完全平方數

367. 有效的完全平方數 給定一個 正整數 num &#xff0c;編寫一個函數&#xff0c;如果 num 是一個完全平方數&#xff0c;則返回 true &#xff0c;否則返回 false 。 進階&#xff1a;不要 使用任何內置的庫函數&#xff0c;如 sqrt 。 示例 1&#xff1a;輸入&#xff1…

袁中的第三次作業

第一題&#xff1a; 輸出月份英文名 設計思路: 1:看題目&#xff1a;主函數與函數聲明&#xff0c;知道它要你干什么2&#xff1a;理解與分析&#xff1a;在main中&#xff0c;給你一個月份數字n&#xff0c;要求你通過調用函數char *getmonth&#xff0c;來判斷&#xff1a;若…