<< Chapter < Page Chapter >> Page >

dfappr.m Approximate discrete distribution from distribution function entered as a function of t .

% DFAPPR file dfappr.m Discrete approximation from distribution function % Version of 10/21/95% Approximate discrete distribution from distribution % function entered as a function of tr = input('Enter matrix [a b] of X-range endpoints ');s = input('Enter number of X approximation points '); d = (r(2) - r(1))/s;t = (r(1):d:r(2)-d) +d/2; m = length(t);f = input('Enter distribution function F as function of t '); f = [0 f]; PX = f(2:m+1) - f(1:m);PX = PX/sum(PX); X = t - d/2;disp('Distribution is in row matrices X and PX')
Got questions? Get instant answers now!

acsetup.m Approximate distribution for absolutely continuous random variable X . Density is entered as a string variable function of t .

% ACSETUP file acsetup.m Discrete approx from density as string variable % Version of 10/22/94% Approximate distribution for absolutely continuous rv X % Density is entered as a string variable function of tdisp('DENSITY f is entered as a STRING VARIABLE.') disp('either defined previously or upon call.')r = input('Enter matrix [a b] of x-range endpoints ');s = input('Enter number of x approximation points '); d = (r(2) - r(1))/s;t = (r(1):d:r(2)-d) +d/2; m = length(t);f = input('Enter density as a function of t '); PX = eval(f);PX = PX*d; PX = PX/sum(PX);X = t; disp('Distribution is in row matrices X and PX')
Got questions? Get instant answers now!

dfsetup.m Approximate discrete distribution from distribution function entered as a string variable function of t .

% DFSETUP file dfsetup.m Discrete approx from string dbn function % Version of 10/21/95% Approximate discrete distribution from distribution % function entered as string variable function of tdisp('DISTRIBUTION FUNCTION F is entered as a STRING') disp('VARIABLE, either defined previously or upon call')r = input('Enter matrix [a b] of X-range endpoints ');s = input('Enter number of X approximation points '); d = (r(2) - r(1))/s;t = (r(1):d:r(2)-d) +d/2; m = length(t);F = input('Enter distribution function F as function of t '); f = eval(F);f = [0 f];PX = f(2:m+1) - f(1:m); PX = PX/sum(PX);X = t - d/2; disp('Distribution is in row matrices X and PX')
Got questions? Get instant answers now!

Setup for independent simple random variables

MATLAB version 5.1 has provisions for multidimensional arrays, which make possible more direct implementation of icalc3 and icalc4.

icalc.m Calculation setup for an independent pair of simple random variables. Input consists of marginal distributions for X , Y , Output is joint distribution and calculating matrices t , u .

% ICALC file icalc.m Calculation setup for independent pair % Version of 5/3/95% Joint calculation setup for independent pair X = 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 calculationsdisp(' Use array operations on matrices X, Y, PX, PY, t, u, and P')
Got questions? Get instant answers now!

Questions & Answers

What is demand
TECK Reply
the amount of a good that buyers are willing and able to purchase
Asit
what is population
Amadou Reply
The people living within a political or geographical boundary.
Ziyodilla
what happens to price and quantity when demand curves shift to the right
Asha Reply
price level goes up. quantity demand increases
Asit
example- inferior goods
Asit
demand law
Athony
Its states that higher the price the of the commodity, and lower the quantity demanded
Kosiso
I am confused but quantity demand will increase.
Asit
No. That's the law of supply
Kosiso
what happens to price and quantity when supply curve shifts left?
Asha Reply
price level will increase
Asit
quantity demand will decrease
Asit
what is inflation
Pop Reply
inflation is a general and ongoing rise in the level of prices in an entire economy.
cynthia
is the pasistance increase in the price of a country economy
Liyu
kk
Duppy
yes
Aadi
how does inflation affects the economy of a country? what is deflation?
Augustine
deflation can simply be define as the persistence decrease in price of a countrys economy
Liyu
the revenge of malthus relates "revenge" with "commodity prices". collect data for 3 commodoties and check their price evolution
Jamshi Reply
what is elasticity
dubela Reply
Elasticity is an economics concept that measures responsiveness of one variable to changes in another variable.
cynthia
right
Augustine
wooow!!
cynthia
Computer software represents
Mboledi Reply
पर्यावरण राज्यों में से किस राज्य में शिष्य शिक्षक अनुपात 30 से अधिक वाले विद्यालयों का प्रतिशत न्यूनतम होता है
plz Reply
Hey what are you trying to mean?
Kenyana
what is Asset
MUBARAK
like a banana
Ahmed
demand is the process whereby consumers are willing and able to purchase a particular product at various price over a given period of time
Samuel Reply
The law of dinimish
Frank Reply
What is the law of dinimish
Frank
What is the law of dinimish
Frank
What is the law of dinimish
Frank
opportunity cost is to forgo something for another.
jackie Reply
yes
King
what is financial market
Asheeru Reply
what is demand
Levinel Reply
Demand is an economic principle referring to a consumer's desire to purchase goods and services and willingness to pay a price for a specific good or service.
Ali
explain any three exceptions to the law of demand
Emma Reply
Difference between extinct and extici spicies
Amanpreet Reply
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?

Ask