<< Chapter < Page Chapter >> Page >

cdbn.m Plots a continuous graph of a distribution function of a simple random variable (or simple approximation).

% CDBN file cdbn.m Continuous graph of distribution function % Version of 1/29/97% Plots continuous graph of dbn function FX from % distribution of simple rv (or simple approximation)xc = input('Enter row matrix of VALUES '); pc = input('Enter row matrix of PROBABILITIES ');m = length(xc); FX = cumsum(pc);xt = [xc(1)-0.01 xc xc(m)+0.01];FX = [0 FX FX(m)]; % Artificial extension of range and domainplot(xt,FX) % Plot of continuous graph gridxlabel('t') ylabel('u = F(t)')title('Distribution Function')
Got questions? Get instant answers now!

simple.m Calculates basic quantites for simple random variables from the distribution, input as row matrices X and P X .

% SIMPLE file simple.m Calculates basic quantites for simple rv % Version of 6/18/95X = input('Enter row matrix of X-values '); PX = input('Enter row matrix PX of X probabilities ');n = length(X); % dimension of X EX = dot(X,PX) % E[X]EX2 = dot(X.^2,PX) % E[X^2] VX = EX2 - EX^2 % Var[X]disp(' ') disp('Use row matrices X and PX for further calculations')
Got questions? Get instant answers now!

jddbn.m Representation of joint distribution function for simple pair by obtaining the value of F X Y at the lower left hand corners of each grid cell.

% JDDBN file jddbn.m Joint distribution function % Version of 10/7/96% Joint discrete distribution function for % joint matrix P (arranged as on the plane).% Values at lower left hand corners of grid cells P = input('Enter joint probability matrix (as on the plane) ');FXY = flipud(cumsum(flipud(P))); FXY = cumsum(FXY')';disp('To view corner values for joint dbn function, call for FXY')
Got questions? Get instant answers now!

jsimple.m Calculates basic quantities for a joint simple pair { X , Y } from the joint distrsibution X , Y , P as in jcalc. Calculated quantities include means, variances, covariance, regression line, and regression curve (conditional expectation E [ Y | X = t ] ).

% JSIMPLE file jsimple.m Calculates basic quantities for joint simple rv % Version of 5/25/95% The joint probabilities are arranged as on the plane % (the top row corresponds to the largest value of Y)P = input('Enter JOINT PROBABILITIES (as on the plane) '); X = input('Enter row matrix of VALUES of X ');Y = input('Enter row matrix of VALUES of Y '); disp(' ')PX = sum(P); % marginal distribution for X PY = fliplr(sum(P')); % marginal distribution for YXDBN = [X; PX]';YDBN = [Y; PY]';PT = idbn(PX,PY); D = total(abs(P - PT)); % test for differenceif D>1e-8 % to prevent roundoff error masking zero disp('{X,Y} is NOT independent')else disp('{X,Y} is independent')end disp(' ')[t,u] = meshgrid(X,fliplr(Y));EX = total(t.*P) % E[X] EY = total(u.*P) % E[Y]EX2 = total((t.^2).*P) % E[X^2] EY2 = total((u.^2).*P) % E[Y^2]EXY = total(t.*u.*P) % E[XY] VX = EX2 - EX^2 % Var[X]VY = EY2 - EY^2 % Var[Y] cv = EXY - EX*EY; % Cov[X,Y]= E[XY] - E[X]E[Y] if abs(cv)>1e-9 % to prevent roundoff error masking zero CV = cvelse CV = 0end a = CV/VX % regression line of Y on X isb = EY - a*EX % u = at + b R = CV/sqrt(VX*VY); % correlation coefficient rhodisp(['The regression line of Y on X is: u = ',num2str(a),'t + ',num2str(b),])disp(['The correlation coefficient is: rho = ',num2str(R),])disp(' ') eYx = sum(u.*P)./PX;EYX = [X;eYx]';disp('Marginal dbns are in X, PX, Y, PY; to view, call XDBN, YDBN') disp('E[Y|X = x]is in eYx; to view, call for EYX') disp('Use array operations on matrices X, Y, PX, PY, t, u, and P')
Got questions? Get instant answers now!

Questions & Answers

are nano particles real
Missy Reply
yeah
Joseph
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
Lale Reply
no can't
Lohitha
where we get a research paper on Nano chemistry....?
Maira Reply
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
Google
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
revolt
da
Application of nanotechnology in medicine
has a lot of application modern world
Kamaluddeen
yes
narayan
what is variations in raman spectra for nanomaterials
Jyoti Reply
ya I also want to know the raman spectra
Bhagvanji
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
LITNING Reply
what is a peer
LITNING Reply
What is meant by 'nano scale'?
LITNING Reply
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
A fair die is tossed 180 times. Find the probability P that the face 6 will appear between 29 and 32 times inclusive
Samson Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied probability. OpenStax CNX. Aug 31, 2009 Download for free at http://cnx.org/content/col10708/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied probability' conversation and receive update notifications?

Ask