题目
A random variable has probability density function given by
\dfrac{1}{4} & -\dfrac{1}{2} \leqslant x < \dfrac{1}{2} \\ 2x - \dfrac{3}{4} & \dfrac{1}{2} \leqslant x \leqslant k \\ 0 & \text{otherwise} \end{cases}$$ where $k$ is a positive constant. (a) Sketch the graph of $f(x)$ <div style="text-align: right;">(2)</div> (b) By forming and solving an equation in $k$, show that $k = 1.25$ <div style="text-align: right;">(4)</div> (c) Use calculus to find $E(X)$ <div style="text-align: right;">(4)</div> (d) Calculate the interquartile range of $X$ <div style="text-align: right;">(5)</div> (Total for Question 2 is 15 marks)题目中文翻译
随机变量 的概率密度函数为
\dfrac{1}{4} & -\dfrac{1}{2} \leqslant x < \dfrac{1}{2} \\ 2x - \dfrac{3}{4} & \dfrac{1}{2} \leqslant x \leqslant k \\ 0 & \text{otherwise} \end{cases}$$ 其中 $k$ 为正数常数。 (a) 画出 $f(x)$ 的图像。 (b) 通过建立并求解关于 $k$ 的方程,证明 $k = 1.25$。 (c) 使用微积分求 $E(X)$。 (d) 计算 $X$ 的四分位距。 (第 2 题共 15 分) </details> # 解答 ## (a) ### 解法一 #### 思路 <details> <summary>展开</summary> 在 $-0.5\leqslant x<0.5$ 上,图像是高度为 $0.25$ 的水平线段;在 $0.5\leqslant x\leqslant k$ 上,图像是斜率为 2 的直线段,并在 $x=k$ 处达到 $2k-0.75$。定义域外的概率密度为 0,图像不能落到横轴下方。 </details> #### 答题过程 <details> <summary>展开</summary> The graph consists of a horizontal segment from $(-0.5,0.25)$ to $(0.5,0.25)$, followed by a straight-line segment from $(0.5,0.25)$ to $(k,2k-0.75)$. Also, $f(x)=0$ outside the interval $[-0.5,k]$. <p align="center"> <img src="" width="420"> </p> </details> ## (b) ### 解法一 #### 思路 <details> <summary>展开</summary> 概率密度函数图像下的总面积为 1。左侧是宽为 1、高为 $1/4$ 的长方形;右侧是两条平行边分别为 $1/4$ 和 $2k-3/4$、宽为 $k-1/2$ 的梯形。令两部分面积之和为 1,解所得二次方程,并用 $k$ 为正数排除负根。 </details> #### 答题过程 <details> <summary>展开</summary> Since the total area under a probability density function is 1,\frac14 +\frac12\left(\frac14+2k-\frac34\right) \left(k-\frac12\right)=1.
\begin{align*} \frac14+\frac12\left(2k-\frac12\right) \left(k-\frac12\right)=&,1 \[4mm] 8k^2-6k-5=&,0 \[4mm] (4k-5)(2k+1)=&,0. \end{align*}
Thus $k=5/4$ or $k=-1/2$. Since $k$ is positive,\boxed{k=\frac54=1.25}.
</details> ### 解法二 #### 思路 <details> <summary>展开</summary> 也可以直接分段积分,使概率密度在整个定义域上的积分等于 1。积分后会得到与几何面积法等价的二次方程,最后同样排除负根。 </details> #### 答题过程 <details> <summary>展开</summary> The total probability is 1, so\int_{-1/2}^{1/2}\frac14,\mathrm{d}x +\int_{1/2}^{k}\left(2x-\frac34\right)\mathrm{d}x =1.
\begin{align*} \frac14+left[x^2-\frac34x\right]_{1/2}^{k} =&,1 \[4mm] \frac14+k^2-\frac34k+\frac18=&,1 \[4mm] k^2-\frac34k-\frac58=&,0 \[4mm] (4k-5)(2k+1)=&,0. \end{align*}
Since $k>0$, $k=5/4=1.25$, as required. </details> ## (c) ### 解法一 #### 思路 <details> <summary>展开</summary> 连续型随机变量的期望为 $E(X)=\int xf(x)\,\mathrm{d}x$,需要按密度函数的两段分别积分。第一段的被积函数 $x/4$ 关于原点为奇函数,在对称区间上的积分为 0;第二段代入 (b) 的 $k=5/4$ 后计算。 </details> #### 答题过程 <details> <summary>展开</summary> Using $k=5/4$,\begin{align*} E(X)=&, \int_{-1/2}^{1/2}\frac{x}{4},\mathrm{d}x \[4mm] &,+\int_{1/2}^{5/4} \left(2x^2-\frac34x\right)\mathrm{d}x. \end{align*}
\begin{align*} E(X)=&, \left[\frac23x^3-\frac38x^2\right]_{1/2}^{5/4} \[4mm] =&,\frac{275}{384}-\left(-\frac1{96}\right) \[4mm] =&,\frac{279}{384} \[4mm] =&,\boxed{\frac{93}{128}}. \end{align*}
</details> ## (d) ### 解法一 #### 思路 <details> <summary>展开</summary> 从 $-1/2$ 到 $1/2$ 的面积恰为 $1/4$,所以第一四分位数是 $Q_1=1/2$。第三四分位数位于密度函数的第二段;从 $1/2$ 到 $Q_3$ 的面积应为 $3/4-1/4=1/2$。建立积分方程,解出符合区间范围的根,再计算 $Q_3-Q_1$。 </details> #### 答题过程 <details> <summary>展开</summary> The area from $-1/2$ to $1/2$ is1\times\frac14=\frac14,
Q_1=\frac12.
\int_{1/2}^{Q_3}\left(2x-\frac34\right)\mathrm{d}x =\frac12.
\begin{align*} \left[x^2-\frac34x\right]_{1/2}^{Q_3} =&,\frac12 \[4mm] Q_3^2-\frac34Q_3+\frac18=&,\frac12 \[4mm] Q_3^2-\frac34Q_3-\frac38=&,0. \end{align*}
Q_3=\frac{3\pm\sqrt{33}}8.
Since $Q_3$ must lie in $[1/2,5/4]$,Q_3=\frac{3+\sqrt{33}}8=1.09307\ldots
\begin{align*} \operatorname{IQR}=&,Q_3-Q_1 \[4mm] =&,\frac{3+\sqrt{33}}8-\frac12 \[4mm] =&,\frac{\sqrt{33}-1}{8} \[4mm] =&,0.59307\ldots \end{align*}
Hence the interquartile range is $\boxed{0.593}$ to 3 significant figures. </details>