# 8.1 Random vectors and matlab  (Page 2/2)

 Page 2 / 2

## Joint absolutely continuous random variables

In the single-variable case, the condition that there are no point mass concentrations on the line ensures the existence of a probability density function, useful in probability calculations.A similar situation exists for a joint distribution for two (or more) variables. For any joint mapping to the plane which assigns zero probability to eachset with zero area (discrete points, line or curve segments, and countable unions of these) there is a density function.

Definition

If the joint probability distribution for the pair $\left\{X,Y\right\}$ assigns zero probability to every set of points with zero area, then there exists a joint density function ${f}_{XY}$ with the property

$P\left[\left(X,\phantom{\rule{0.166667em}{0ex}}Y\right)\in Q\right]=\int {\int }_{Q}{f}_{XY}$

We have three properties analogous to those for the single-variable case:

$\text{(f1)}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}{f}_{XY}\ge 0\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{(f2)}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\int {\int }_{{\mathbf{R}}^{2}}{f}_{XY}=1\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{(f3)}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}{F}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)={\int }_{-\infty }^{t}{\int }_{-\infty }^{u}{f}_{XY}$

At every continuity point for ${f}_{XY}$ , the density is the second partial

${f}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)=\frac{{\partial }^{2}{F}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)}{\partial t\phantom{\rule{0.166667em}{0ex}}\partial u}$

Now

${F}_{X}\left(t\right)={F}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}\infty \right)={\int }_{-\infty }^{t}{\int }_{-\infty }^{\infty }{f}_{XY}\left(r,\phantom{\rule{0.166667em}{0ex}}s\right)\phantom{\rule{0.166667em}{0ex}}dsdr$

A similar expression holds for ${F}_{Y}\left(u\right)$ . Use of the fundamental theorem of calculus to obtain the derivatives gives the result

${f}_{X}\left(t\right)={\int }_{-\infty }^{\infty }{f}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}s\right)\phantom{\rule{0.166667em}{0ex}}ds\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{and}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}{f}_{Y}\left(u\right)={\int }_{-\infty }^{\infty }{f}_{XY}\left(r,\phantom{\rule{0.166667em}{0ex}}u\right)\phantom{\rule{0.166667em}{0ex}}du$

Marginal densities . Thus, to obtain the marginal density for the first variable, integrate out the second variablein the joint density, and similarly for the marginal for the second variable.

## Marginal density functions

Let ${f}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)=8tu\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}0\le u\le t\le 1$ . This region is the triangle bounded by $u=0$ , $u=t$ , and $t=1$ (see [link] )

${f}_{X}\left(t\right)=\int {f}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)\phantom{\rule{0.166667em}{0ex}}du=8t{\int }_{0}^{t}u\phantom{\rule{0.166667em}{0ex}}du=4{t}^{3},\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}0\le t\le 1$
${f}_{Y}\left(u\right)=\int {f}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)\phantom{\rule{0.166667em}{0ex}}dt=8u{\int }_{u}^{1}t\phantom{\rule{0.166667em}{0ex}}dt=4u\left(1-{u}^{2}\right),\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}0\le u\le 1$

$P\left(0.5\le X\le 0.75,\phantom{\rule{0.277778em}{0ex}}Y>0.5\right)=P\left[\left(X,\phantom{\rule{0.166667em}{0ex}}Y\right)\in Q\right]$ where Q is the common part of the triangle with the strip between $t=0.5$ and $t=0.75$ and above the line $u=0.5$ . This is the small triangle bounded by $u=0.5$ , $u=t$ , and $t=0.75$ . Thus

$p=8{\int }_{1/2}^{3/4}{\int }_{1/2}^{t}tu\phantom{\rule{0.166667em}{0ex}}dudt=25/256\approx 0.0977$

## Marginal distribution with compound expression

The pair $\left\{X,\phantom{\rule{0.166667em}{0ex}}Y\right\}$ has joint density ${f}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)=\frac{6}{37}\left(t+2u\right)$ on the region bounded by $t=0$ , $t=2$ , $u=0$ , and $u=max\left\{1,\phantom{\rule{0.166667em}{0ex}}t\right\}$ (see [link] ). Determine the marginal density f X .

SOLUTION

Examination of the figure shows that we have different limits for the integral with respect to u for $0\le t\le 1$ and for $1 .

• For $0\le t\le 1$
${f}_{X}\left(t\right)=\frac{6}{37}{\int }_{0}^{1}\left(t+2u\right)\phantom{\rule{0.166667em}{0ex}}du=\frac{6}{37}\left(t+1\right)$
• For $1
${f}_{X}\left(t\right)=\frac{6}{37}{\int }_{0}^{t}\left(t+2u\right)\phantom{\rule{0.166667em}{0ex}}du=\frac{12}{37}\phantom{\rule{0.166667em}{0ex}}{t}^{2}$

We may combine these into a single expression in a manner used extensively in subsequent treatments. Suppose $M=\left[0,\phantom{\rule{0.166667em}{0ex}}1\right]$ and $N=\left(1,\phantom{\rule{0.166667em}{0ex}}2\right]$ . Then ${I}_{M}\left(t\right)=1$ for $t\in M$ (i.e., $0\le t\le 1$ ) and zero elsewhere. Likewise, ${I}_{N}\left(t\right)=1$ for $t\in N$ and zero elsewhere. We can, therefore express f X by

${f}_{X}\left(t\right)={I}_{M}\left(t\right)\frac{6}{37}\left(t+1\right)+{I}_{N}\left(t\right)\frac{12}{37}\phantom{\rule{0.166667em}{0ex}}{t}^{2}$

## Discrete approximation in the continuous case

For a pair $\left\{X,\phantom{\rule{0.166667em}{0ex}}Y\right\}$ with joint density ${f}_{XY}$ , we approximate the distribution in a manner similar to that for a single random variable. We then utilize the techniquesdeveloped for a pair of simple random variables. If we have n approximating values t i for X and m approximating values u j for Y , we then have $n·m$ pairs $\left({t}_{i},\phantom{\rule{0.166667em}{0ex}}{u}_{j}\right)$ , corresponding to points on the plane. If we subdivide the horizontal axis for values of X , with constant increments $dx$ , as in the single-variable case, and the vertical axis for values of Y , with constant increments $dy$ , we have a grid structure consisting of rectangles of size $dx·dy$ . We select t i and u j at the midpoint of its increment, so that the point $\left({t}_{i},\phantom{\rule{0.166667em}{0ex}}{u}_{j}\right)$ is at the midpoint of the rectangle. If we let the approximating pair be $\left\{{X}^{*},\phantom{\rule{0.166667em}{0ex}}{Y}^{*}\right\}$ , we assign

${p}_{ij}=P\left(\left({X}^{*},\phantom{\rule{0.166667em}{0ex}}{Y}^{*}\right),=,\left({t}_{i},\phantom{\rule{0.166667em}{0ex}}{u}_{j}\right)\right)=P\left({X}^{*}={t}_{i},\phantom{\rule{0.277778em}{0ex}}{Y}^{*}={u}_{j}\right)=P\left(\left(X,\phantom{\rule{0.166667em}{0ex}}Y\right)\phantom{\rule{0.277778em}{0ex}}\text{in}\phantom{\rule{4.pt}{0ex}}ij\text{th}\phantom{\rule{4.pt}{0ex}}\text{rectangle)}$

As in the one-variable case, if the increments are small enough,

$P\left(\left(X,\phantom{\rule{0.166667em}{0ex}}Y\right)\in \phantom{\rule{0.277778em}{0ex}}ij\text{th}\phantom{\rule{4.pt}{0ex}}\text{rectangle)}\approx dx·dy·{f}_{XY}\left({t}_{i},\phantom{\rule{0.166667em}{0ex}}{u}_{j}\right)$

The m-procedure tuappr calls for endpoints of intervals which include the ranges of X and Y and for the numbers of subintervals on each. It then prompts for an expression for ${f}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)$ , from which it determines the joint probability distribution. It calculates the marginal approximatedistributions and sets up the calculating matrices t and u as does the m-process jcalc for simple random variables. Calculations are then carried outas for any joint simple pair.

## Approximation to a joint continuous distribution

${f}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)=3\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{on}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}0\le u\le {t}^{2}\le 1$

Determine $P\left(X\le 0.8,\phantom{\rule{0.166667em}{0ex}}Y>0.1\right)$ .

>> tuappr Enter matrix [a b] of X-range endpoints  [0 1] Enter matrix [c d] of Y-range endpoints  [0 1] Enter number of X approximation points  200Enter number of Y approximation points  200 Enter expression for joint density  3*(u <= t.^2) Use array operations on X, Y, PX, PY, t, u, and P>> M = (t <= 0.8)&(u > 0.1);>> p = total(M.*P)          % Evaluation of the integral with p =   0.3355                % Maple gives 0.3352455531

The discrete approximation may be used to obtain approximate plots of marginal distribution and density functions.

## Approximate plots of marginal density and distribution functions

${f}_{XY}\left(t,\phantom{\rule{0.166667em}{0ex}}u\right)=3u$ on the triangle bounded by $u=0$ , $u\le 1+t$ , and $u\le 1-t$ .

>> tuappr Enter matrix [a b] of X-range endpoints  [-1 1] Enter matrix [c d] of Y-range endpoints  [0 1] Enter number of X approximation points  400Enter number of Y approximation points  200 Enter expression for joint density  3*u.*(u<=min(1+t,1-t)) Use array operations on X, Y, PX, PY, t, u, and P>> fx = PX/dx;                % Density for X  (see  [link] )                               % Theoretical (3/2)(1 - |t|)^2>> fy = PY/dy;                % Density for Y>> FX = cumsum(PX);           % Distribution function for X ( [link] )>> FY = cumsum(PY);           % Distribution function for Y>> plot(X,fx,X,FX)            % Plotting details omitted

These approximation techniques useful in dealing with functions of random variables, expectations, and conditional expectation and regression.

who are u?
Lamine
haha
Cleaford
scarm
nura
what it this
Cleaford
hi y'all
Dope
how does group chat help y'all 🤔
Dope
hi y'all
Dope
how does group chat help y'all 🤔
Dope
how does group chat help y'all 🤔
Dope
to learn from one another
Lamine
oh okay
Dope
😟
Creative
Yes
Lamine
what is type of economic
how to understand basics of economics
what is demand schedle
When you make a Scedule of the demand you made
Rodeen
What is macroeconomics
It's one of the two branches of Economics that deal with the aggregate economy.
Mayen
it's about inflation, occupation, gdp and so on
alberto
What is differences between Microeconomics and Macroeconomic?
Bethrand
a price floor of 24 imposed
monopolistic competition
yap
nura
any one there to answer my question
Fixed Costs per week Variable Costs per bear Rent & Rates of Factory Hire & machines Heating & Lighting Repayment of Bank Loan K100.00 K45.00 K5.00 K50.00 Materials Foam Wages K6.00 K1.00 K1.00 Total K200.00 K8.00
Richard
one of the scarce resources that constrain our behaviour is time. each of us has only 24 hours in a day. how do you go about allocating your time in a given day among completing alternatives? once you choose a most important use of time. why do you not spend all your time to it. use the notion of op
mohsina mala..Bangla app hobe na
mani Baba. First learn the spelling of Economics
Economics- The study of how people use their limited resources to tey and satisfy unlimited wants.
Kelly
hmmm
Mani
etar bangla apps hobe na?
Mohsina
what is defination of acnomics
বাংলা বই পাওয়া যায় না?
what is a commdity
in a comparison of the stages of meiosis to the stage of mitosis, which stages are unique to meiosis and which stages have the same event in botg meiosis and mitosis
A fair die is tossed 180 times. Find the probability P that the face 6 will appear between 29 and 32 times inclusive By Madison Christian By Brooke Delaney By Ali Sid By Subramanian Divya By By Brooke Delaney By Cath Yu By OpenStax By By Brooke Delaney