<< Chapter < Page Chapter >> Page >

mgsumn.m function [z,pz] = mgsumn(varargin) is an alternate to mgnsum, utilizing varargin in MATLAB version 5.1. The call is of the form [z,pz] = mgsumn([x1;p1],[x2;p2], ..., [xn;pn]) .

function [z,pz] = mgsumn(varargin)% MGSUMN [z,pz] = mgsumn([x1;p1],[x2;p2], ..., [xn;pn]) % Version of 6/2/97 Uses MATLAB version 5.1% Sum of n independent simple random variables % Utilizes distributions in the form [x;px](two rows) % Iterates mgsumn = length(varargin); % The number of distributions z = 0; % Initializationpz = 1; for i = 1:n % Repeated use of mgsum[z,pz] = mgsum(z,varargin{i}(1,:),pz,varargin{i}(2,:));end
Got questions? Get instant answers now!

diidsum.m function [x,px] = diidsum(X,PX,n) determines the sum of n iid simple random variables, with the common distribution X , P X .

function [x,px] = diidsum(X,PX,n)% DIIDSUM [x,px] = diidsum(X,PX,n) Sum of n iid simple random variables% Version of 10/14/95 Input rev 5/13/97 % Sum of n iid rv with common distribution X, PX% Uses m-function mgsum x = X; % Initializationpx = PX; for i = 1:n-1[x,px] = mgsum(x,X,px,PX);end
Got questions? Get instant answers now!

itest.m Tests for independence the matrix P of joint probabilities for a simple pair { X , Y } of random variables.

% ITEST file itest.m Tests P for independence % Version of 5/9/95% Tests for independence the matrix of joint % probabilities for a simple pair {X,Y}pt = input('Enter matrix of joint probabilities '); disp(' ')px = sum(pt); % Marginal probabilities for X py = sum(pt'); % Marginal probabilities for Y (reversed)[a,b] = meshgrid(px,py);PT = a.*b; % Joint independent probabilities D = abs(pt - PT)>1e-9; % Threshold set above roundoff if total(D)>0 disp('The pair {X,Y} is NOT independent')disp('To see where the product rule fails, call for D') elsedisp('The pair {X,Y} is independent') end
Got questions? Get instant answers now!

idbn.m function p = idbn(px,py) uses marginal probabilities to determine the joint probability matrix (arranged as on the plane) for an independent pair of simple randomvariables.

function p = idbn(px,py) % IDBN p = idbn(px,py) Matrix of joint independent probabilities% Version of 5/9/95 % Determines joint probability matrix for two independent% simple random variables (arranged as on the plane) [a,b]= meshgrid(px,fliplr(py)); p = a.*b
Got questions? Get instant answers now!

isimple.m Takes as inputs the marginal distributions for an independent pair { X , Y } of simple random variables. Sets up the joint distribution probability matrix P as in idbn , and forms the calculating matrices t , u as in jcalc . Calculates basic quantities and makes available matrices X , Y , P X , P Y , P , t , u for additional calculations.

% ISIMPLE file isimple.m Calculations for independent simple rv % Version of 5/3/95X = input('Enter row matrix of X-values '); Y = input('Enter row matrix of Y-values ');PX = input('Enter X probabilities '); PY = input('Enter Y probabilities ');[a,b] = meshgrid(PX,fliplr(PY));P = a.*b; % Matrix of joint independent probabilities [t,u]= meshgrid(X,fliplr(Y)); % t, u matrices for joint calculations EX = dot(X,PX) % E[X]EY = dot(Y,PY) % E[Y] VX = dot(X.^2,PX) - EX^2 % Var[X]VY = dot(Y.^2,PY) - EY^2 % Var[Y] disp(' Use array operations on matrices X, Y, PX, PY, t, u, and P')
Got questions? Get instant answers now!

Questions & Answers

How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
sciencedirect big data base
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
characteristics of micro business
for teaching engĺish at school how nano technology help us
How can I make nanorobot?
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
how can I make nanorobot?
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
what is the actual application of fullerenes nowadays?
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
is Bucky paper clear?
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
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 the best Algebra and trigonometry course in your pocket!

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?