Expected loss of having fewer for the old medicine: 0.80 $1 + 0.20 ($1 + $10) = $3 Expected loss of having fewer for the new medicine: 0.95 $2 + 0.05 ($2 + $10) = $2.5 The patient is better off (moneywise) with the new medicine, so the cost of $2 is justified.
Let P be the break even price (same expected loss for both). 3.0 = 0.95 P + 0.05*(P + 10) = P + 0.5 => P = $2.5 When the price for the new medicine is below (or at) $2.5, we will buy it, otherwise when the price is higher than $2.5, we will not buy it.
+--------+ | /20 | +--------+
# Maple code, count number of successes N := 10000; S := 0; for k from 1 to N do # one simulation with 8 new tires tires := stats[random,normald[600,200]](8); # we start race with first 4 tires life := [seq(tires[i],i=1..4)]; # increase the life span of the lowest tires for j from 1 to 4 do life := sort(life); life[1] := life[1] + tires[4+j]; end do; # check if we are reaching the 1000 mile limit reach := min(op(life)); if reach < 1000 then S := S+1; end if; end do;
S = 3729, so the probability is about .3729
+--------+ | /20 | +--------+
B(n) = .8*B(n-1) + 400, B(0) = 0
B(n) = .8*B(n-1) + 400 = .8*(.8*B(n-2) + 400) + 400 ... n-1 --- = (.8^n)*B(0) + 400 > (.8)^k --- k=0 = 400*(.8^n - 1)/(.8 - 1) = 2000*(1 - .8^n)
We will never get more than $2000.
+--------+ | /20 | +--------+
The transfer function of a digital filter is the z-transform of the unit impulse response, i.e.: infty ----- H(z) = > h(k) z^(-k) ----- k=0 where { h(0), h(1), h(2), ... } is the response of the filter to { 1, 0, 0, ...}. Example: the averaging filter is defined by y(k) = (u(k) + u(k-1)/2 and has z-transform H(z) = (1+z^(-1))/2.
We write the input signal u as a linear combination of delayed impulses d and apply the linearity of the filter: y = F u = F( u(0)*d(0) + u(1)*d(1) + u(2)*d(2) + ... ) = u(0)*(F d(0)) + u(1)*(F d(1)) + u(2)*(F d(2)) + ... ) = u(0)*{ h(0), h(1), h(2), ...} + u(1)*{ 0, h(0), h(1), h(2), ...} + u(2)*{ 0, 0, h(0), h(1), h(2), ...} = { u(0)*h(0), u(0)*h(1) + u(1)*h(0), u(0)*h(2) + u(1)*h(1) + u(2)*h(0), ...} = { y(0), y(1), y(2), ... } So we see that once h(k) is known, we can compute y(k) from u(k) via the convolution operator '*' : y = h'*'u.
+--------+ | /20 | +--------+
+-----------+-------------+-----------+---------+-----------+ | boat type | storage | purchase | rental | need | | #seats | area | cost | price | for boats | +-----------+-------------+-----------+---------+-----------+ | 1 | f(1)=2 ft^2 | c(1)=$122 | p(1)=$5 | n(1)=20 | | 2 | f(2)=3 ft^2 | c(2)=$130 | p(2)=$7 | n(2)=15 | | 3 | f(3)=4 ft^2 | c(3)=$150 | p(3)=$9 | n(3)=10 | +-----------+-------------+-----------+---------+-----------+Boat i requires f(i) square feet to store, costs c(i) dollars to purchase and can be rented at p(i) dollars a trip. Our constraints are as follows. We need at least n(i) boats of type i, but have only 400 square feet to store the boats and our budget is limited to $10,000.
max 5*x(1) + 7*x(2) + 9*x(3) subject to 2*x(1) + 3*x(2) + 4*x(3) <= 400 122*x(1) + 130*x(2) + 150*x(3) <= 10000 - x(1) <= -20 - x(2) <= -15 - x(3) <= -10
min 400*y(1) + 10000*y(2) - 20*y(3) - 15*y(3) - 10*y(5) subject to 2*y(1) + 122*y(2) - y(3) >= 5 3*y(1) + 130*y(2) - y(4) >= 7 4*y(1) + 150*y(2) - y(5) >= 9
f = [400 10000 -20 -15 -10]'; A = [-2 -122 1 0 0; -3 -130 0 1 0; -4 -150 0 0 1; -1 0 0 0 0; 0 -1 0 0 0; 0 0 -1 0 0; 0 0 0 -1 0; 0 0 0 0 -1]; b = [-5 -7 -9 0 0 0 0 0]; [y,lambda]=simlp(f,A,b) y = 0 0.0600 2.3200 0.8000 -0.0000 lambda = 20.0000 15.0000 37.4000 165.4000 0 0 0 27.4000 The answer is x(1) = 20, x(2) = 15, x(3) = 37.4.
+--------+ | /20 | +--------+
We take the equation y(k) = a*u(k) + b*u(k+1) + c*u(k+2) and evaluate it at the 8 samples, for the signal u(t) and v(t). This gives 16 linear equations in 3 unknowns: % MATLAB CODE: dt = 2*pi/8; % sampling interval t0 = 0:dt:2*pi-dt; % range for u(k) t1 = dt:dt:2*pi; % range for u(k+1) t2 = 2*dt:dt:2*pi+dt; % range for u(k+2) u0 = cos(t0); u1 = cos(t1); u2 = cos(t2); % sample u(t) v0 = cos(3*t0); v1 = cos(3*t1); v2 = cos(3*t2); % sample v(t) A1 = [u0' u1' u2']; % 1st conditions b1 = u1'; A2 = [v0' v1' v2']; % 2nd conditions b2 = zeros(8,1); A = [A1; A2]; % A x = b b = [b1; b2];
x = A\b x = 0.3536 0.5000 0.3536
+--------+ | /20 | +--------+
Use the Maple functions, for the options (A = 1st, B = 2nd): A := n -> 100000*(1 + 0.07)^n B := n -> 100000*(1 + 0.05)^n + 8000*n Evaluate in 2nd year: A(2) = $114,490 < $126,250 = B(2) Evaluate in 20th year: A(20) = $386,968 < $425,330 = B(20) Option B, buying the house is better in the short run, even at year 20 it is still the better option.
A plot of A and B reveals that the two curves intersect between year 24 and year 25. Evaluation of A and B gives A(24) = $507,236.70 < $514,509.99 = B(24) A(25) = $542,743.26 > $538,635.49 = B(25) We should sell the house in year 24.
+--------+ | /20 | +--------+
D(p) = 5 + 10/p, S(p) = p^2 - 3 D(p) = S(p) gives the equilibrium price p = $3.32 (Maple) Revenue = p*S(p) = 3.32*8.01 = 26.59
new supply nS := S(p+1) = (p+1)^2 - 3 new equilibrium price: $2.47 new supply: $9.05 new revenue: $22.35 With a subsidy, the producer will supply more goods, which will decrease the price and the revenue.
The benefit of the consumer is the price decrease: $3.32 - $2.47 = $0.85. So the consumer gets 85 cents of the $1 subsidy per item, the other 25 cents goes to the produces who loses revenue.
+--------+ | /20 | +--------+