Posted on Categories:信息论, 数学代写

# 数学代写|信息论代写Information Theory代考|GENERATION OF DISCRETE DISTRIBUTIONS FROM FAIRCOINS

avatest™

avatest信息论information theory代写，免费提交作业要求， 满意后付款，成绩80\%以下全额退款，安全省心无顾虑。专业硕 博写手团队，所有订单可靠准时，保证 100% 原创。https://avatest.org/， 最高质量的信息论information theory作业代写，服务覆盖北美、欧洲、澳洲等 国家。 在代写价格方面，考虑到同学们的经济条件，在保障代写质量的前提下，我们为客户提供最合理的价格。 由于统计Statistics作业种类很多，同时其中的大部分作业在字数上都没有具体要求，因此信息论information theory作业代写的价格不固定。通常在经济学专家查看完作业要求之后会给出报价。作业难度和截止日期对价格也有很大的影响。

avatest™ 为您的留学生涯保驾护航 在澳洲代写方面已经树立了自己的口碑, 保证靠谱, 高质且原创的澳洲代写服务。我们的专家在信息论information theory代写方面经验极为丰富，各种信息论information theory相关的作业也就用不着 说。

## 数学代写|信息论代写Information Theory代考|GENERATION OF DISCRETE DISTRIBUTIONS FROM FAIRCOINS

In the early sections of this chapter we considered the problem of representing a random variable by a sequence of bits such that the expected length of the representation was minimized. It can be argued (Problem 5.5.29) that the encoded sequence is essentially incompressible and therefore has an entropy rate close to 1 bit per symbol. Therefore, the bits of the encoded sequence are essentially fair coin flips.

In this section we take a slight detour from our discussion of source coding and consider the dual question. How many fair coin flips does it take to generate a random variable $X$ drawn according to a specified probability mass function $\mathbf{p}$ ? We first consider a simple example.

Example 5.11.1 Given a sequence of fair coin tosses (fair bits), suppose that we wish to generate a random variable $X$ with distribution
$$X= \begin{cases}a & \text { with probability } \frac{1}{2} \ b & \text { with probability } \frac{1}{4} \ c & \text { with probability } \frac{1}{4}\end{cases}$$
It is easy to guess the answer. If the first bit is 0 , we let $X=a$. If the first two bits are 10 , we let $X=b$. If we see 11 , we let $X=c$. It is clear that $X$ has the desired distribution.

We calculate the average number of fair bits required for generating the random variable, in this case as $\frac{1}{2}(1)+\frac{1}{4}(2)+\frac{1}{4}(2)=1.5$ bits. This is also the entropy of the distribution. Is this unusual? No, as the results of this section indicate.

## 数学代写|信息论代写Information Theory代考|THE HORSE RACE

Assume that $m$ horses run in a race. Let the $i$ th horse win with probability $p_i$. If horse $i$ wins, the payoff is $o_i$ for 1 (i.e., an investment of 1 dollar on horse $i$ results in $o_i$ dollars if horse $i$ wins and 0 dollars if horse $i$ loses).

There are two ways of describing odds: $a$-for-1 and $b$-to-1. The first refers to an exchange that takes place before the race-the gambler puts down 1 dollar before the race and at $a$-for-1 odds will receive $a$ dollars after the race if his horse wins, and will receive nothing otherwise. The second refers to an exchange after the race-at $b$-to-1 odds, the gambler will pay 1 dollar after the race if his horse loses and will pick up $b$ dollars after the race if his horse wins. Thus, a bet at $b$-to-1 odds is equivalent to a bet at $a$-for-1 odds if $b=a-1$. For example, fair odds on a coin flip would be 2 -for-1 or 1-to-1, otherwise known as even odds.

We assume that the gambler distributes all of his wealth across the horses. Let $b_i$ be the fraction of the gambler’s wealth invested in horse $i$, where $b_i \geq 0$ and $\sum b_i=1$. Then if horse $i$ wins the race, the gambler will receive $o_i$ times the amount of wealth bet on horse $i$. All the other bets are lost. Thus, at the end of the race, the gambler will have multiplied his wealth by a factor $b_i o_i$ if horse $i$ wins, and this will happen with probability $p_i$. For notational convenience, we use $b(i)$ and $b_i$ interchangeably throughout this chapter.

The wealth at the end of the race is a random variable, and the gambler wishes to “maximize” the value of this random variable. It is tempting to bet everything on the horse that has the maximum expected return (i.e., the one with the maximum $p_i o_i$ ). But this is clearly risky, since all the money could be lost.

Some clarity results from considering repeated gambles on this race. Now since the gambler can reinvest his money, his wealth is the product of the gains for each race. Let $S_n$ be the gambler’s wealth after $n$ races. Then
$$S_n=\prod_{i=1}^n S\left(X_i\right),$$
where $S(X)=b(X) o(X)$ is the factor by which the gambler’s wealth is multiplied when horse $X$ wins.

## 数学代写|信息论代写Information Theory代考|GENERATION OF DISCRETE DISTRIBUTIONS FROM FAIRCOINS

$$X= \begin{cases}a & \text { with probability } \frac{1}{2} \ b & \text { with probability } \frac{1}{4} \ c & \text { with probability } \frac{1}{4}\end{cases}$$

## 数学代写|信息论代写Information Theory代考|THE HORSE RACE

$$S_n=\prod_{i=1}^n S\left(X_i\right),$$

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。