#include<iostream>
using namespace std;
double getY(double x)
{
double y;
// y = 0.0 , x <= 0.0
if( x <= 0.0 )
y = 0.0;
// y = x^2 , 0.0 < x <= 1.0
else if( x <= 1.0 )
y = x * x;
// y = 2x , 1.0 < x <= 10.0
else if( x <= 10.0 )
y = 2 * x;
// y = 20.0, x > 10.0
else
y = 20.0;
return y;
}
int main()
{
cout<<"Enter x : ";
double x;
cin>>x;
cout<<"\ny("<<x<<") : "<<getY(x);
return 0;
}
Sample Output
(3) Consider the function given by y0.0 y=2.2 y=2x 0.0 0.0 < x < 1.0 1.0<x<10.0...
3. Consider two random variables X and Y, whose joint density function is given as follows. Let T be the triangle with vertices (0,0), (2,0), and (0,1). Then if (x, y for some constant K (a) (2 pts.) Find the constant K (b) (4 pts.) Find P(X +Y< 1) and P(X > Y). (c) (4 pts.) Find the marginal densities fx and fy. Conclude that X and Y are not independent
Suppose a joint probability density function for two variables X and Y is given as follows: {24x0, if 0 < x < 1,0 < y < 1 f(x, y) = otherwise Please find the probability p (w > 1) =? 3
Problem 6. Consider a random variable X whose cumulative distribution function (cdf) is given by 0 0.1 0.4 0.5 0.5 + q if -2 f 0 r< 2.2 if 2.2<a<3 If 3 < x < 4 We are also told that P(X > 3) = 0.1. (a) What is q? (b) Compute P(X2 -2> 2) (c) What is p(0)? What is p(1)? What is p(P(X S0)? (Here, p(.) denotes the probability mass function (pmf) for X) (d) Sketch a plot...
the answer should be 4/3 x
u Lipulation of X given Y =y? 10. Let X and Y have joint density (2xy for 0 Sy < 2x < 2 f(x, y) = { otherwise. What is the conditional expectation of Y given X = r?
Let X and Y have joint probability density function fx,y(x,y) = e-(z+y) for 0 x and 0 y. Find (a) Pr(X=y (b) Prmin(X, Y) > 1/2) (c) Pr(X Y) d) the marginal probability density function of Y (e) E[XY].
1. Consider the function y - f(x) defined by Supposing that you are given x, write an R expression for y using if state- ments. Add your , then run it to plot the function jf # input x.values <- seq(-2, 2, by - 0.1) expression for y to the following program # for each x calculate y n <- length(x.values) y.values <- rep(0, n) for (i in 1:n) t x <- x.values [i] # your expression for y goes...
Consider fx (x)=e*, 0<x and joint probability density function fx (x, y) = e) for 0<x<y. Determine the following: (a) Conditional probability distribution of Y given X =1. (b) ECY X = 1) = (c) P(Y <2 X = 1) = (d) Conditional probability distribution of X given Y = 4.
Consider the following cumulative distribution function for X. 7 0.1 08 0.9 1.0 Fo) 0.3 0.6 (i) Determine the probability distribution. ii) Find P(X < 1). iii Find P(0 <XS5).
3. Suppose x,y,z satisfy the competing species equations <(6 - 2x – 3y - 2) y(7 - 2x - 3y - 22) z(5 - 2x - y -22) (a) (6 points) Find the critical point (0,Ye, ze) where ye, we >0, and sketch the nullclines and direction arrows in the yz-plane. (b) (6 points) Determine if (0, yc, ze) is stable. (c) (8 points) Determine if the critical point (2,0,0) is stable, where I > 0.
7. Let X and Y have joint probability mass function fx.y(x,y) = (x+y)/30 for x = 0.1, 2.3 and y0,1,2. Find (a) PrX 2,Y-1) (b) PrX>2,Y S1) (c) Pr(X + Y=4) (d) Pr[X >Y) (e) the marginal probability mass function of Y, and (f) E[XY]