Assignment Chef icon Assignment Chef

Browse assignments

Assignment catalog

33,401 assignments available

[SOLVED] Amath 568 advanced differential equations homework 5

1. Consider the singular equation ϵy′′ + (1 + x) 2 y ′ + y = 0 with y(0) = y(1) = 1 and with 0 < ϵ ≪ 1. (a) Obtain a uniform approximation which is valid to leading order.(b) Show that assuming the boundary layer to be at x = 1 is inconsistent. (Hint: use the stretched inner variable ξ = (1 − x)/ϵ).(c) Plot the uniform solution for ϵ = 0.01, 0.05, 0.1, 0.2.2. Consider the singular equation: ϵy′′ − x 2 y ′ − y = 0 with y(0) = y(1) = 1 and with 0 < ϵ ≪ 1. (a) With the method of dominant balance, show that there are three distinguished limits: δ = ϵ 1/2 , δ = ϵ, and δ = 1 (the outer problem). Write down each of the problems in the various distinguished limits.(b) Obtain the leading order uniform approximation. (Hint: there are boundary layers at x = 0 and x = 1).(c) Plot the uniform solution for ϵ = 0.01, 0.05, 0.1, 0.2. 

$25.00 View

[SOLVED] Amath 568 advanced differential equations homework 3

1. Particle in a box: Consider the time-independent Schr¨odinger equation: iℏ ∂ψ ∂t = − ℏ 2 2m ∂ 2ψ ∂x2 + V (x)ψ which is the underlying equation of quantum mechanics where V (x) is a given potential. (a) Let ψ = u(x) exp(−iEt/ℏ) and derive the time-independent Schr¨odinger equation. (Note that E here corresponds to energy).(b) Show that the resulting eigenvalue problem is of Sturm-Liouville typ(c) Consider the potential V (x) = 0 |x| < L ∞ elsewhere which implies u(L) = u(−L) = 0. Calculate the normalized eigenfunctions and eigenvalues.(d) If an electron jumps from the third state to the ground state, what is the frequency of the emitted photon? Recall that E = ℏω.(e) If the box is cut in half, then u(0) = u(L) = 0. What are the resulting eigenfunctions and eigenvalues?2. Find the Green’s function (fundamental solution) for each of the following problems, and express the solution u in terms of the Green’s function. (a) u ′′ + c 2u = f(x) with u(0) = u(L) = 0.(b) u ′′ − c 2u = f(x) with u(0) = u(L) = 0.3. Calculate the solution of the Sturm-Liouville problem using the Green’s function approach. Lu = −[p(x)ux]x + q(x)u = f(x) 0 ≤ x ≤ L with α1u(0) + β1u ′ (0) = 0 and α2u(L) + β2u ′ (L) = 0 

$25.00 View

[SOLVED] Amath 568 advanced differential equations homework 2

1. Consider the nonhomogeneous problem ⃗x′ = A⃗x + ⃗g(t). Let ⃗x = M⃗y where the columns of M are the eigenvectors of A.2. Given L = −d 2/dx2 find the eigenfunction expansion solution of d 2 y dx2 + 2y = −10 exp(x) where y(0) = 0 and y ′ (1) = 0.3. Given L = −d 2/dx2 find the eigenfunction expansion solution of d 2 y dx2 + 2y = −x where y(0) = 0 and y(1) + y ′ (1) = 0.4. Consider the Sturm-Liouville eigenvalue problem Lu = − d dx  p(x) du dx + q(x)u = λρ(x)u for 0 < x < l with boundary conditions α1u(0) − β1u ′ (0) = 0 α2u(l) − β2u ′ (l) = 0 and with p(x) > 0, ρ(x) > 0, and q(x) ≥ 0 and with p(x), ρ(x), q(x), and p ′ (x) continuous over 0 < x < l, and the weighted inner product ⟨ϕ, ψ⟩ρ = R l 0 ρ(x)ϕ(x)ψ ∗ (x)dx. Show the following: (a) L is a self-adjoint operator.(b) Eigenfunctions corresponding to different eigenvalues are orthogonal, i.e. ∀n ̸= m : ⟨un, um⟩ρ = 0.(c) Eigenvalues are real, non-negative, and eigenfunctions may be chosen to be real valued.(d) Each eigenvalue is simple, i.e. it only has one eigenfunction. 

$25.00 View

[SOLVED] Amath 568 advanced differential equations homework 1

1. Determine the eigenvalues and eigenvectors (real solutions), (b) sketch the behavior and classify the behavior. (a) x ′ =  2 −5 1 −2  x(b) x ′ =  −1 −1 0 −0.25 x(c) x ′ =  3 −4 1 −1  x(d) x ′ =  2 −5/2 9/5 −1  x(e) x ′ =  2 −1 3 −2  x(f) x ′ =  1 √ 3 √ 3 −1  x(g) x ′ =  3 −2 2 −2  x2. Consider x ′ = −(x − y)(1 − x − y) and y ′ = x(2 + y) and plot the solutions. Verify your qualitative dynamics with MATLAB/Python/fortran.3. Consider x ′ = x−y 2 and y ′ = y −x 2 and plot the solutions. Verify your qualitative dynamics with MATLAB/Python/fortran.4. Consider x ′ = (2 + x)(y − x) and y ′ = (4 − x)(y + x) and plot the solutions. Verify your qualitative dynamics with MATLAB/Python/fortran.

$25.00 View

[SOLVED] Amath 562 homework assignment 5

1. Please give an integer-valued stochastic Levy process ´ (ηt)t≥0, ηt ∈ Z = {· · · , −2, −1, 0, 1, 2, · · · }, which, furthermore, is a martingale.2. We have discussed in the class that “independent, stationary increments”, under certain conditions, gives rise to the Gaussian nature of Brownian motion due to the central limit theorem: The item 3 in MLN’s Definition 7.2.1. Discuss why the Levy process as defined ´ in Definition 10.1.1, item 3 cannot be improved to a Gaussian distribution?3. A probability distribution is infinitely divisible if it can be expressed as the probability distribution of the sum of an arbitrary number of independent and identically distributed (i.i.d.) random variables. It turns out, every infinitely divisible probability distribution corresponds to a Levy process. ´(a) Show that normal distribution on R is infinitely divisible. (b) Show that Poisson distribution on N is infinitely divisible. (c) The pdf of Cauchy distribution is fX(x) = γ π(γ 2 + x 2 ) .Show its characteristic function ϕX(u) := Ee iuX is e −γ|u| . What are its expected value and its variance?(d) A real-valued random variable X is infinitely divisible if and only if its characteristic function ϕX(u) is of the form e ψ(u) , with ψ(u) = iµu − 1 2 σ 2u 2 + Z R  e iuz − 1 − iuz1|z|

$25.00 View

[SOLVED] Amath 562 homework assignment 4

1. Professor Matt Lorig’s notes, exercises 8.5 2. The Ornstein-Uhlenbeck process, defined by time-homogeneous linear SDE dX(t) = −µX(t)dt + σdW(t), X(0) = x0, in which σ and µ > 0 are two constants, has its Kolmogorov forward equation ∂ ∂tΓ(x0;t, x) = σ 2 2 ∂ 2 ∂x2 Γ(x0;t, x) + ∂ ∂x  µxΓ(x0;t, x)  , (1) with the initial condition Γ(x0; 0, x) = δ(x − x0).(a) Show that the solution to the linear PDE (1) has a Gaussian form and find the solution. (b) What is the limit of lim t→∞ Γ(x0;t, x)? (c) Find E[X(t)] and V[X(t)].(d) You note that E[X(t)] is the same as the solution to the ODE dx dt = −µx, which is obtained when σ = 0. Is this result true for a nonlinear SDE?3. The time-independent solution to a Kolmogorov forward equation gives a stationary probability density function for the Ito process dXt = µ(Xt)dt + σ(Xt)dW(t): − ∂ ∂x  µ(x)f(x)  + 1 2 ∂ 2 ∂x2  σ 2 (x)f(x)  = 0.This is a linear, second-order ODE. We assume that both µ(x) and σ(x) satisfy the conditions required to have a solution f(x) on the entire R. Find the expression for the general solution. There are two constants of integration, which should be determined according to appropriate probabilistic reasoning.4. Professor Matt Lorig’s notes, exercises 9.35. Consider a continuous-time (n+1)-state Markov process X(t), X ∈ S = {0, 1, 2, · · · , n}, with transition rates g(i, j) = 1 dt P  X(t + dt) = j|X(t) = i, j ̸= i.Let state 0 be an absorbing state, e.g., all g(0, j) = 0, 1 ≤ j ≤ n. Let τk be a hitting time: τk := inf  t ≥ 0 : X(t) = 0, X(0) = k. (a) Show that X 1≤k≤n g(j, k)E[τk] = −1. (b) Derive a system of equations relating E[τ 2 k ] to E[τj ], 1 ≤ j, k ≤ n.(c) Now if both states 0 and n are absorbing, let uk be the probability of X(t), starting with X(0) = k, being absorbed into state 0 and 1 − uk be the probability being absorbed into state n. Derive a system of equations for uk.

$25.00 View

[SOLVED] Amath 562 advanced stochastic processes homework 3

1. W(t) is a standard Brownian motion. (a) Let c > 0 be a constant. Show that the process defined by B(t) = cW(t/c2 ) is a standard Brownian motion.(b) For t = n = 0, 1, . . . , show that W2 (n) − n is a discrete time martingale.2. The nth variation of a function f, over the interval [0, T], is defined as VT (n, f) := lim ||Π||→0 mX−1 j=0 |f(tj+1) − f(tj )| n in which Π = {0 = t0, t1, . . . , tm = T} is a partition of [0, T], and ||Π|| = max 0≤j≤m−1 (tj+1 − tj ). Show that VT (1, W) = ∞ and VT (3, W) = 0, where W is a Brownian motion.3. (a) Show that the transition probability density function for standard Brownian motion W(t): 1 dx Pr {x < W(t + s) ≤ x + dx| W(s) = y} = 1 √ 2πt e − (x−y) 2 2t = f(x;t|y) in which t, s > 0.(b) Show that f(x;t|y) satisfies the following two linear partial differential equations: ∂f(x;t|y) ∂t = 1 2  ∂ 2 f(x;t|y) ∂x2  and ∂f(x;t|y) ∂t = 1 2  ∂ 2 f(x;t|y) ∂y2 4. Exercise 8.1: Compute d(W4 t ). Write W4 T as an integral with respect to W plus an integral with respect to t. Use this representation of W4 T to show that EW4 T = 3T 2 . Compute EW6 T using the same technique.5. Exercise 8.2: Find an explicit expression for YT where dYt = rdt + αYtdWt6. Exercise 8.3: Suppose X, ∆ and Π are given by dXt = σXtdWt , ∆t = ∂f ∂x(t, Xt), Πt = Xt∆t where f is some smooth function. Show that if f satisfies  ∂ ∂t + 1 2 σ 2x 2 ∂ 2 ∂x2  f(t, x) = 0 for all (t, x), then Π is a martingale with respect to a filtration Ft for all W.7. Exercise 8.4: Suppose X is given by dXt = µ(t, Xt)dt + σ(t, Xt)dWtFor any smooth function f define M f t := f(t, Xt) − f(0, X0) − Z t 0  ∂ ∂s + µ(s, Xs) ∂ ∂x + 1 2 σ 2 (s, Xs) ∂ 2 ∂x2  f(s, Xs)ds. Show that Mf is a martingale with respect to a filtration Ft for W. 

$25.00 View

[SOLVED] Amath 562 advanced stochastic processes homework 2

1. Consider a measurable space (Ω, F) with finite elementary event set Ω = {1, . . . , n}, the corresponding F = 2Ω, and the Lebesgue-measure like counting measure νi = 1, 1 ≤ i ≤ n. A stochastic Markov (chain) dynamics, Xk, has one step transitions in terms of a set of conditional probabilities p (ν) (i, j) = Pr{Xk+1 = j|Xk = i}. This assumption of a ”counting measure” ν is implicit in all Markov chain theory. (a) If a Markov chain with p (ν) (i, j) has a unique invariant probability π = {π1, . . . , πn} with all positive πk, express the transition probability as the Radon-Nikodym derivative w.r.t. π, denoted as p (π) (i, j).(b) Show that πP (π) = 1 and P (π)π T = 1 T where P (π) is the transition probability matrix w.r.t. π, 1 = (1, . . . , 1), and 1 T is the column vector of 1’s. Please explain these two equations.(c) The reversibility of a Markov chain is introduced in §4.5 of MLN. What is the P (π) of a reversible Markov chain?(d) In discrete time, a deterministic first-order ”dynamics” in the Ω is defined by a one step map S : Ω → Ω. Since a deterministic first-order dynamics is just a special case of a Markov dynamics, express the transition probability p (ν) (i, j) corresponding to the map S.(e) Show the deterministic dynamics in (d) has an invariant probability π = ( 1 n , . . . , 1 n ) if and only if the map S is one to one. Within the context of a deterministic S, discuss the notion of irreducibility defined in §4.3 of MLN.2. Consider the continuous time Markov chain with generator G =   −λ λ 0 0 0 . . . µ −µ − λ λ 0 0 . . . 0 2µ −2µ − λ λ 0 . . . 0 0 3µ −3µ − λ λ . . . . . . . . . . . . . . . . . . . . .   in which λ, µ > 0. (a) Find its invariant probability distribution π.(b) Assume X0 = 0. Using the matrix exponential symbol (e Gt )ij , give the joint probability for the finite trajectory Pr{Xt1 = i1, Xt2 = i2, . . . , Xtn = in}, where 0 < t1 < t2 < · · · < tn.(c) Introducing the probability generating function (see MLN §5.2) GX(s, t) = E[s Xt ]. Show that GX(s, t) satisfies the following partial differential equation ∂ ∂tGX(s, t) = u  s, t, GX, ∂GX ∂s , ∂ 2GX ∂s2  . Give the explicit form for the function on the rhs.(d) Show that the solution to the PDE in (c), with initial data GX(s, 0), is GX(s, t) = GX1 + (s − 1)e −µt , 0  exp  λ µ (s − 1) 1 − e −µt ) (e) Verify that the limit of GX(s, t) as t → ∞ agrees with the π obtained in (3. Let the generator G of a three-state continuous time Markov chain Xt be given by   −α − β α β β −α − β α α β −α − β   = α   −1 − b 1 b b −1 − b 1 1 b −1 − b   , in which α, β > 0, b = β/α. Note the G matrix is circulant, so its eigenvalues and eigenvectors have special forms which are readily obtained. Assuming that X0 follows the invariant probability distribution π; therefore X (st) t is a stationary Markov chain. Let the function y(X) = −1, 0, 1 corresponding to the states X = 1, 2, 3. (a) Compute µ = E[y(X (st) t )] and σ 2 = V[y(X (st) t )].(b) For two random variables V (ω) and W(ω), E [(V − E[V ])(W − E[W])] is called covariance between V and W. Find an analytical expression for the covariance function g(τ ) = E hy(X (st) t+τ ) − µ  y(X (st) t ) − µ i .(c) Show that lim T→∞ 1 T Z T 0 y(X (st) t )dt = µ where the convergence is by L 2 .(d) Use a computer and Monte Carlo simulation to verify that lim T→∞ 1 T Z T 0 y(X (st) t+τ )y(X (st) t )dt − µ 2 agrees with g(τ ) you obtained from (b)4. Let W(t) be a standard Brownian motion. Introducing a function of the Brownian motion W˜ (s) = (1 − s)W  s 1 − s  0 < s < 1 Compute its expected value, variance, and covariance function Cov[W˜ (s1), W˜ (s2)] 0 < s1 < s2 < 1 W˜ (s) is known as a Brownian bridge.5. W(t) is a standard Brownian motion. What is the characteristic function of W(Nt) where Nt is a Poisson process with intensity λ, and the brownian motion W(t) is independent of the Poisson process Nt . 

$25.00 View

[SOLVED] Amath 562 advanced stochastic processes homework 1

1. Write about the relationship between the mathematical theory of probability and its applications to real-world data2. Give two examples (Ω1, F1, P1) with X1(ω) and (Ω2, F2, P2) with X2(ω ′ ) and show that in both cases the cumulative probability function is given by P1 (X1(ω) > x) = P2 (X2(ω ′ ) > x) = e −rx3. Consider a reference measure P1 and a collection of continuously parameterized measures P2(θ). Assume the RND Z(ω; θ) = dP2 dP1 (ω; θ) is smooth with respect to θ. Now let Ik(θ) = −E P2  ∂ k ∂θk log  dP2 dP1 (ω; θ)  Assuming expectations and differentiations with respect to θ are interchangeable, show the following: (a) I0(θ) = − Z Ω  dP2 dP1 (ω; θ)  log  dP2 dP1 (ω; θ)  P1(dw) This is called the Shannon entropy of P2 w.r.t. the measure P1.(b) I1(θ) = 0(c) I2(θ) = E P2 “ ∂ ∂θ log  dP2 dP1 (ω; θ) 2 # ≥ 0 This is known as the Fisher information.4. The Legendre-Fenchel transform (MLN §3.5) is given by Λ ∗ (x) = sup t∈R {xt − Λ(t)} for x ∈ R. Assuming that the Λ(t) is strictly convex and twice differentiable, then the supremum in the equation is given by Λ ∗ (x) =  Λ ∗ (t) = x(t)t − Λ(t) x(t) = Λ′ (t) This gives the function Λ∗ (x) in a parametric form in terms of t as a continuous parameter. Show that this equation implies the following: (a) Λ∗ (x) is also convex.(b) An inverse, dual relation Λ(t) = sup x∈R {tx − Λ ∗ (x)}(c) With the pair of convex functions Λ(x) and Λ∗ (t) defined above, show that for any real x and t, Λ(t) + Λ∗ (x) − tx ≥ 0 What is the condition for equality to hold?5. For Ω = {1, 2, . . . , n} and two probability measures ν = (ν1, ν2, . . . , νn) and p = (p1, p2, . . . , pn), where νi , pi > 0, the Shannon relative entropy is given by H[ν ∥ p] = Xn i=1 νi ln  νi pi  (a) Show that for any two probability measures ν >> 0 and p >> 0 H[ν ∥ p] ≥ 0 This is known as Jensen’s inequality.(b) Show that the Legendre-Fenchel transform of H[ν||p] is given by sup ν>>0 (Xn i=1 ϵiνi − H[ν||p] ) = lnXn i=1 pie ϵi in which ϵ = (ϵ1, ϵ2, . . . , ϵn) is the conjugate variable to ν.6. Let Ω be a simply connected compact domain in R m. Consider the statistical mechanical energy function E(x) for x ∈ Ω, and the sequence of probability measures whose density functions w.r.t. the Lebesgue measure is f (n) (x) = Ane −nE(x) where An is the normalization factor A −1 n = Z Ω e −nE(x) dx which is assumed to satisfy limn→∞ log An n = 0 Note that this is the Bolzmann-Gibbs distribution where n takes the role of inverse temperature β. We now add some additional structure by letting x = (x1, y), where x1 ∈ R and y = (x2, . . . , xm) ∈ R m−1 . Now let f (n) 1 (x) be the marginal distribution f (n) 1 (x) = An Z Ω∩Rm−1 e nE(x,y) dy. Where we assume limn→∞ 1 n log f (n) 1 (x) = −Λ ∗ (x) (a) Show that the n-scaled cumulant generating function log Z f (n) 1 (x)e ntxdx has the limit limn→∞ 1 n log Z f (n) 1 (x)e ntxdx = max x∈R {tx − Λ ∗ (x)} Assume all functions are sufficiently smooth to allow one to freely exchange limits and integration w.r.t x.(b) Denoting Λ(t) = max x∈R {tx − Λ ∗ (x)} show that one can obtain Λ∗ (x) parametrically as Λ ∗ (x) = ( Λ ∗ (t) = − d d(1/t)  Λ(t) t  x(t) = Λ′ (t)7. Let G = (qkl)K×K be the infinitesimal generator, or transition probability rate, for a continuous-time Markov chain Xt ∈ S = {1, 2, . . . , K}: Pr{Xt+dt = l|Xt = k} =  qkldt l ̸= k 1 − P m̸=k qkmdt l = k Let us assume that G has rank K − 1 and is diagonalizable with eigenvalues λ1 = 0, λ2, . . . , λK. It can be shown using the Perron-Frobenius theorem that the real part of λk is negative for all k ≥ 2. (a) Let τ be a fixed time interval. Show that P = e τG := X∞ j=0 1 j! (τG) j is a transition probability matrix for a Markov chain, which has the same invariant probability as G, π = (π1, . . . , πK).(b) Let ξ(i) be a real-valued function for i ∈ S. Let X0, Xτ , . . . , Xmτ , . . . be the sample path of the discrete-time Markov chain. Now let ξ¯ (m) = 1 m mX−1 j=0 ξ(Xjτ ) and show that limm→∞ E h ξ¯ (m) i = X K k=1 πkξ(k)

$25.00 View

[SOLVED] Amath 562 final exam

1. [40pt] Wt is a standard Brownian motion. (a) Find the probability density of W2 t . (b) Evaluate the expectation: E “Z T 0 W2 t dWt 2 # . (c) Show that W3 t − 3tWt is a martingale.(d) Use Ito’s formula to write the following stochastic process Xt = e Wt + t + 2 into the standard form dXt = µ(t, ω)dt + σ(t, ω)dWt .2. [40pt] The concept of change of measure in terms of a Radon-Nikodym derivative can be summarized as in the following diagram:Ω, F, P  fX(x)Ω, F, P˜  ˜fX(x) ✲ ✲ ❄ ❄ X(ω) X(ω) dP˜ dP (ω)(a) Assuming that in the diagram, both probability density functions fX(x) and ˜fX(x) for a random variable X(ω) are given. Find the RND dP˜ dP (ω) in terms of the X(ω).(b) In the diagram below, X : Ω → R is a random variable with a smooth probability density function. A smooth function g(x) : R → R represents the RND gX(ω)  = dP˜ dP (ω).Let us consider a random variable Y (ω) = h −1X(ω)  , or X(ω) = hY (ω)  , where h(x) : R → R is a monotonic and smooth function on R and h −1 is the inverse function.If the random variable Y (ω) under the new measure P˜ has a probability density function ˜fY (x) = fX(x), find the function h(y).Ω, F, P  fX(x)Ω, F, P˜  ˜fX(x) ✲ ✲ ✑ ✑ ✑ ✑ ✑ ✑ ✑ ✑✑✸ ❄ ❄ X(ω) X(ω) Y (ω) dP˜ dP (ω) = g[X(ω)](c) Now consider a probability space (Ω, F, P), and X(ω) = X1, X2, · · · , Xn)(ω) is a n-dimensional random variables, whose sccessive differences Xj − Xj−1 are all conditionally, normally distributed independent random variables: Xj+1 − Xj ∼ N  µj+1(Xj ), σ2 j+1(Xj )  .Find the change of measures Z(ω) = dP˜ dP (ω) such that under the new measure P˜, Xj+1 − Xj ∼ N 0, σ2 j+1(Xj )  .(d) What is the conditional expectation EZ|X1, · · · , Xkfor k < n?3. [20pt] Let (X, Y )(t) be an Ito process in R 2 , as the solution to the SDE ( dX(t) = µt, X, Y  dt + σ 2t, X, Y  dW(t), dY (t) = θt, X, Y  dt, in whch µ, σ, and θ are all continuous functions. Find the first and second variations of Y (t).4. [20pt] Consider SDE dXt = µ(Xt)dt + σ(Xt)dWt . (a) Show that v(x, t) := E h δ(x − Xt)X0 = y i , where δ(t) is the Dirac-δ function, satisfies the partial differential equation    ∂v(x, t) ∂t = ∂ 2 ∂x2  σ 2 (x) 2 v(x, t)  − ∂ ∂x  µ(x)v(x, t)  , v(x, 0) = δ(x − y).(b) Show that u(x, t) = E h φ(Xt)X0 = x i satisfies the partial differential equation    ∂u(x, t) ∂t = σ 2 (x) 2 ∂ 2u(x, t) ∂x2 + µ(x) ∂u(x, t) ∂x , u(x, 0) = φ(x).5. [50pt] We denote Kolmogorov’s backward and forward operators Lx[u] = σ 2 (x) 2 d 2u(x) dx 2 + µ(x) du(x) dx , L ∗ x [f] = d 2 dx 2  σ 2 (x) 2 f(x, t)  − d dx  µ(x)f(x, t)  .(a) Show that Lx has an alternative expression: Lx[u] = σ 2 (x)s(x) 2 d dx  s −1 (x) du(x) dx  , (1) where s(x) is known as the scale density: s(x) = exp  − Z 2µ(x) σ 2 (x) dx  .(b) Give the corresponding expression, as in (1), for L ∗ x . (c) Consider the linear partial differential equation (PDE)    ∂f(x, t) ∂t = L ∗ xf(x, t)− γ(t, x)f(x, t), f(x, 0) = ψ(x), (2)where the operator L ∗ x is defined above. Express the solution to PDE (2) in terms of the Ito process Xt that satisfies dXt = µ(Xt)dt + σ(Xt)dWt . 6. [30pt] Consider a two-dimensional SDE dX1(t) = µ1(X1, X2)dt + σdW1(t), dX2(t) = µ2(X1, X2)dt + σdW2(t), whereµ1, µ2  (x) = −∇U(x) and x = (x1, x2), and W1(t) and W2(t) are two independent standard Brownian motions.(a) Give the generator A and its L 2R 2 , dx  adjoint A∗ .They are also known as Kolmogorov’s backward and forward operators for the time-homogeneous Ito diffusion: A[u] = σ 2 2 ∇2u + · · · , A ∗ [f] = σ 2 2 ∇2 f + · · · .(b) Show that under a proper choice of the weight ρ(x) > 0 for the inner product between any f, g ∈ L 2 ⟨f, g⟩ρ = Z R2 ρ(x)f(x)g(x)dx, A is self-adjoint, i.e., ⟨f, Ag⟩ρ = ⟨Af, g⟩ρ.You can assume that both f(x) and g(x), and their partial derivatives, go to 0 sufficiently fast as |x| → ∞. (c) Similarly, with an alternative choice of the weight for the inner product, A∗ is also self-adjoint: ⟨f, A ∗ g⟩ρ = ⟨A∗ f, g⟩ρ. (Hint: This is the 2-d generalization of the material in MLN, Sec. 9.5)7. [30pt] Let Xt ∈ R 2 be a Levy process defined by ´ Xt = Z t 0 σ(t)dW(t) + Z R2 zN(t, dz),in which the second term is a compound Poisson process with scalar Poisson random measure N(t, z, ω) that is independent from the W(t, ω); σ, N ∈ R 1 and W, z ∈ R 2 . If the Levy measure ´ ν(dz) = EN(1, dz)= λ 2πη2 exp  − z 2 1 + z 2 2 2η 2  dz, where dz = dz1dz2, and both λ and η are real positive numbers. Find the characteristic function for Xt .

$25.00 View

[SOLVED] CMT304 Analog Differentiable and Machine Programming Python

Module Code:                            CMT304 Module Title:                             Programming Paradigms Assessment Title:                    Analog, Differentiable and Machine Programming Assignment The attached measurements .csv file contains measurements obtained from the analog cir- cuit below.   It is a csv file where the first column contains the time and the second col- umn the voltage measurement at x in the circuit  (1, 000 datapoints from time 0 to 2π).  This circuit consists of analog computing components we used with LTSpice in the module (ic indicates a non-inverting integrator, + a summer, - an inverter and AB a multiplier). The data in the csv file are noisy voltage measurements from this circuit.  Information about the values a, textttb, and x0 is not available. This assignment is about analysing the data with differentiable programming techniques and some questions about the approach as given by the tasks below, aligned with the contents of part three of the module.  It is a simple example to demonstrate your understanding of the programming paradigms involved. There are of course other approaches one can use to analyse the data, but this is not asked for. The example has been kept simple to avoid the need of high computational resources. This should be executable with reasonable CPU resources without GPU; you can of course also use the Linux machines in the COMSC Linux lab. Task 1 (worth 40%): Write a python program using differentiable programming techniques to approximate the measurement data in measurements .csv with a parameterised function fp  : R '→ R, t → x.  You may use pytorch, tensorflow or jax for this (or maybe a combi- nation of these packages; using numpy and matplotlib for supporting functionality is fine – any other packages are not needed; check with the coursework setter if in doubt). You are free to choose any function type (some analytical function, a neural network, etc), but you may want to consider the circuit diagram to choose a suitable function and its parameterisa- tion. Your code can produce the results in any suitable format, on the terminal or in files (do not submit these). You should report these results with Task 2.  Submit a single python file solving this task.  Assume measurements .csv is in the directory the python file is executed from. Task 2 (worth 40%): Justify the function and the parameterisation you have used to match the data and explain what you can learn from this about the circuit given your results from Task 1. Or, if you cannot conclude anything, explain why not. Write a short report about this of up to 400 words. Task 3 (worth 20%):  Under the assumption that the analysis program for Task  1 needs to be very efficient on a CPU, explain whether the performance of a particular part of your code could be improved by implementing it in assembly (there is no need to provide code, only the concept).  If you do not see any use for this, explain why not instead.  Make sure you refer to your specific code and state any assumptions about the hardware, if applicable; generic arguments are not needed. Write a short report about this of up to 400 words. Submit your answers to Task 2 and 3 in a single PDF file, with clear headings indicating the task. The word limits for Task 2 and Task 3 are an upper limit, not a target length. Text longer than the word limit for each point may be ignored. Learning Outcomes Assessed •  Explain the conceptual foundations, evaluate and apply various programming paradigms, such as logic, functional, scripting, filter-based programming, pattern matching and quantum computing, to solve practical problems. •  Discuss and contrast the issues, features, design and concepts of a range of program- ming paradigms and languages to be able to select a suitable programming paradigm to solve a problem

$25.00 View

[SOLVED] 553420/620 Probability Assignment 07 R

553.420/620 Probability Assignment #07 1. In class we learned that a chi-square distribution with n > 0 degrees of freedom is the distribution of a continuous random variable having a Gamma( n 2 , 2)-distribution. We usually write this as X ∼ χ2n . (a) Using this fact or just using the distribution sheet, construct the PDF of a χ 2 2 , i.e., a chi-square with 2 degrees of freedom. Is this another familiar distribution? If so, what specifically is it? Include parameters. (b) Let X ∼ χ 2 2 . Using the MGF of a χ 2 2 , compute E(X). (c)* (continued) Using the MGF of a χ 2 2 , compute E(e X/4 ), E(XeX/4 ) and E(X2 e X/4 ). (d)* (continued) E(e X/2 ) is not finite. Using the MGF of a χ 2 2 , explain what goes wrong here that didn’t go wrong in part (c). 2. Suppose X ∼ exp(1), and let a > 0 be a fixed constant. Use the CDF method to find the PDf of Y = √aX. Remark: With the value a = 1 you notice this is just the PDF of the rv R from problem 5 on HW#6. Now this problem gives us an alternate way to do problem 5(c) from HW#6: 3. Suppose X ∼ uniform(0, 1). Use the CDF method to find the PDF of Y = ln(1−X/X) . Just as a reminder here: part of this problem is for you to find the support of the rv Y . To help in this look at what happens to Y as X gets close to 0 from the right, and then look at what happens to Y when X gets close to 1 from the left. 4. Consider this function: (a) Show that it is a joint PDF. (b) Compute P(0 < X < 2/1, 0 < Y < 2/1). (c) Compute P(X + Y ≤ 2/1). 5. Suppose X and Y are jointly continuous rvs having the joint PDF from problem 4. (a) Compute the marginal PDF of X. (b) Use the marginal PDF to compute P(X ≤ 2/1). 6. The graph of the quadratic polynomial y = Ax2 − 1, when A > 0, has a unique positive root. For example when A = 2/1 this unique root is √ 2. For this problem we suppose A is random, A ∼ exp(1). Find the PDF of the (random) unique positive root. Hint: the two solutions to Ax2 + Bx + C = 0 are and In our problem only one of these is positive. 7. Chips numbered 1 through 5 are in a hat and someone selects two of these chips uniformly at random without replacement. Let X be the number of even chips selected. Y be the number of chips still in the hat that are strictly between the two selected. (a) Compute the joint PMF of X and Y in tabular form. Be sure to identify the support of each rv, for consistency, please make X the rows and Y the columns. (b) Compute P(Y > X) and P(XY = 0). Clearly label each calculation. (c) Derive the marginal PMFs of each rv X and Y . 8. Let X be a continuous random variable. You may suppose for this problem that its CDF F(x) is not only continuous but is also strictly increasing so that there is an inverse function F −1 (y). Now, consider the new random variable Y = F(X), that is, Y is the random variable you get when we plug X into its own CDF. Show that Y has a uniform(0, 1) distribution. Remark: This is an important fact to know since it is the basis of many ideas in statistics and often used in simulating observations of such a random variable X from simulations of uniform(0, 1): namely, to produce a value of a random variable X having CDF F, generate a uniform(0, 1) observation U. Then F −1 (U) will have the distribution F. Here’s an application of this result: Suppose we want to generate an X ∼ exp(λ) distribution. Compute the CDF of X, it turns out to be F(x) = 1 − e −λx for x > 0 (and = 0 otherwise). Compute the inverse of this CDF: y = F(x) = 1 − e −λx ⇐⇒ x = −λ/1 ln(1 − y) = F −1 (y). Next generate a uniform(0, 1) ob-servation U (most computer programs can do this, eg., in Microsoft Excel the formula is =RAND()). Then x = F −1 (U) = − λ/1 ln(1 − U) will be exp(λ) distributed. 9. In this problem Z ∼ N(0, 1) and X ∼ N(µ, σ2). Write the answers to the following using the CDF Φ(z) of a standard normal distribution. Also, find the values of each of the following using either tables or a calculating device. (a) P(Z < 2). (b) P(|Z| ≤ 2). (c) P(Z > −3.1). (d) P(−2.3 < Z < 1.5). (e) Let µ = 100 and σ = 10 (σ 2 = 100). P(77 < X < 115). (f) Let µ = 100 and σ = 10 (σ 2 = 100). P(|X − 95| ≤ 10). 10. Suppose X, Y are independent uniform(0, 60), so that fX,Y (x, y) = 60 1 2 for 0 < x < 60, 0 < y < 60. You can think of X and Y as the times (measured in minutes) at which two people arrive to a facility; they arrive independently of each other and at any time (uniformly ar random) in the one-hour interval from time 0 to time 60 minutes. (a) Compute P(|X − Y | < 10). That is, compute the probability they arrive within 10 minutes of each other. Also, this is the probability that neither has o wait more than 10 minutes for the other to arrive. (b) Compute the probability that one of them has to wait at least 30 minutes for the other. 11. In this problem the discrete X and the continuous Y are jointly distributed with joint distribution Please understand that, in this function, x-values are discrete whereas the y-values are continuous, so we sum on x and integrate on y with this joint distribution. (a) Derive the marginal PDF of Y . Identify it if you can along with parameters. (b) Derive the marginal PMF of X. Identify the resulting familiar PMFs in the cases where m = 1 and m = 2. 12. Let X ∼ geom(p) and Y ∼ geom(q) be independent. Compute P(X = Y ). 13. Suppose X ∼ exp(1) and Y ∼ Gamma(2, 1) are independent. Find the PDF of U = X/Y.

$25.00 View

[SOLVED] COMPSCI 753 Algorithms for Massive Data Exam 2021

COMPSCI 753 (11/ 11/2021 17:00) Algorithms for Massive Data (Exam) 1 Locality-Sensitive Hashing Given three documents S1, S2 , S3  and a customized query document q: S1 = {3, 4, 5}, S2  = {0, 1, 2}, S3  = {0, 1, 3}, q = {2, 3, 4, h(y)}; h(y) = y   mod 6. where y is the last digit of your Student ID. For instance, suppose my Stu- dentID=xxxxx7, my query document would be q= {2, 3, 4, 1}. 1.1    Computing MinHash Signatures 1. Generate the bit-vector representation for {S1, S2 , S3 , q} in feature space {0, 1, 2, 3, 4, 5}.        [1 mark] 2. Generate the MinHash matrix for {S1, S2 , S3 , q} using the following four MinHash functions.      [2 marks] h1 (x) = x    mod 6 h2 (x) = (x + 1)   mod 6 h3 (x) = (x + 3)   mod 6 h4 (x) = (x + 5)   mod 6 3. Consider the query q and estimate the signature-based Jaccard similari- ties: J(q, S1 ), J(q, S2 ), and J(q, S3 ).    [1 mark] 1.2    Tuning Parameters for rNNS In our lecture, we have learnt to formulate the collision probability (i.e., S- curve) given the number of bands b and the number of rows per band r as follows: Pr(s) = 1 - (1 - sr )b. Consider three sets of parameters (r=2,b=10), (r=6,b=30), (r=10,b=50). The collision probabilities for similarity s in range of [0,1] for each (r ,b) are pro- vided accordingly as follows: 1. Which settings give at most 5% of false negatives for any 70%-similar pairs? Briefly explain the reason.    [1 mark] 2. Which settings give at most 15% of false positives for any 30%-similar pairs? Briefly explain the reason.    [1 mark] 1.3    c-Approximate Randomized rNNS [3 marks] We have learnt that a family of functions H is called (d1 , d2 , p1 , p2 )-sensitive with collision probability p1  > p2  and c > 1 if the following conditions hold for any uniformly chosen h ∈ H and 8 x, y ∈ U : – If d(x, y) ≤ r , Pr[h(x) = h(y)] ≥ p1  for similar points, and – If d(x, y) ≥ cr , Pr[h(x) = h(y)] ≤ p2  for dissimilar points. Consider a family transformation from (d1 , d2 , p1 , p2 )-sensitive to (d1 , d2 , 1 — (1 — p1(k))L , 1 — (1 — p2(k))L )-sensitive,where k and L refer to the number of hash functions and the number of hash tables, respectively. Briefly describe steps to achieve such transformation. What is the expected impact on probability bounds after the transformation? 2    Data Stream Algorithms 2.1    Misra-Gries Algorithm [1 mark] Given the data stream below, perform. the Misra-Gries algorithm with k = 3 counters and present the summary, including the elements and its counter values, when the execution of the algorithm is finished. S = {4, 36, 14, 36, 57, 36, 22, 57, 5, 57} 2.2 CountMin Sketch Algorithm [4 marks] Given the following three hash functions, perform the CountMin Sketch al- gorithm on the same data stream S in Section 2.1 and present the (i) hash table, (ii) counter matrix, and (iii) estimated frequency of each element in a stream after processing all elements. h1 (x) = x    mod 3 h2 (x) = (3x + 1)   mod 3 h3 (x) = (5x + 2)    mod 3 2.3 Count Sketch Algorithm [4 marks] Consider the same data stream S and hash functions in Section 2.2. Given the sign hash functions below, perform the Count Sketch algorithm and present the (i) hash table, (ii) counter matrix, and (iii) estimated frequency of each element in a stream after processing all elements. s1 (x) = ((2x + 1)    mod 3)   mod 2 s2 (x) = ((3x + 2)    mod 3)   mod 2 s3 (x) = ((5x + 2)    mod 3)   mod 2 3 Algorithms for Graphs 3.1 Biased PageRank Given a directed graph: 1. We have learnt the matrix formulation of PageRank r = M · r. Convert the above graph to a column-stochastic adjacency matrix.        [1 mark] 2. Compute the PageRank of the graph above.                        [2 marks] 3. Let β = 0.8, calculate the biased PageRank with the teleport set S = {[the last digit of your student ID] mod 4}.           [3 marks] Note: The rank of each node should round to 3 decimal places. 3.2    Community Detection 1. Use two or three sentences to explain the diferences between modularity maximization and the Girvan-Newman algorithm for community detec- tion.                                                                          [2 marks] 2. In the modularity maximization algorithm, which pair of nodes in the graph below should be merged in the first step to maximize the gain of modularity? Explain your answer. If there are multiple pairs of nodes with the same modularity gain, report all of them to get full mark. [4 marks] 3.3    In  uence Maximization 1. Compute the influence spread of the seed set S = {1} using the Indepen- dent Cascade (IC) model on the following graph.                 [2 marks] 2. In the lecture, we have learnt a greedy algorithm to find a seed set for maximizing the influence based on the IC model. Starting with empty seed set, which node will be the first to be added to the seed set in the greedy algorithm?      [2 marks] 4 Recommender Systems 4.1    Collaborative filtering Given the following user-item interaction matrix: 1. Apply the basic user-based collaborative filtering (without considering  bias) with cosine similarity. Give the top-1 recommended item to user  u2 .                                                                            [3 marks] 2. In the lecture, we have discussed how to model the rating bias including  (i) the bias over all transactions; (ii) the bias of a user; and (iii) the bias of an item in collaborative filtering. What is the rating of user u1 to item p2  if all biases are considered?                                          [3 marks] Note: The predicted ratings should round to one decimal place. 4.2    Evaluation of recommender system A recommender system generates a ranked list of items for a specific user u as (p3 ; p10 ; p5 ; p7 ; p1 ; p9 ; p2 ; p4 ; p6 ; p8 ). The ranked list contains all items that haven’t been purchased by the user in the training data. We find that the user only buys items p10  and p1  in the test data. 1. Compute the AUC for user u.                                           [1 mark] 2. If top-3 items are returned to the user, what are the values of Precision@3 and Recall@3?        [2 marks] Note: The AUC, Precision@3 and Recall@3 should round to 2 decimal places. 4.3    Application of Recommendation Algorithms A start-up company plans to build a system for recommending training courses to users. The company has 100,000 users and 500 courses. Each user in the database has a complete profile with age, gender, educational back- ground, and working experience. Each course has a short description of its content. Ninety percent of the users have taken one course, and the remaining users have taken more than two courses. The data scientists in the company are considering three recommendation al- gorithms that we have learnt in the lectures: (a) user-based collaborative fil- tering; (b) item-based collaborative filtering; and (c) content-based approach. 1. Which of (a) and (b) is more appropriate for the above system? Explain the reason.        [2 marks] 2. If you were one of the data scientists, which of the above methods will you use for recommending new courses to users? Explain the reason. [2 marks] 3. The company wants a single model to support (i) recommending existing courses to an arbitrary group of users; (ii) recommending existing courses to new users; and (iii) recommending new courses to existing users. Which of the above methods can be used? If none of them apply, give a solution based on the methods we learnt in the lectures.     [3 marks]

$25.00 View

[SOLVED] EXMBM532-24B HAM Managing Innovation and Value Creation C/C

EXMBM532-24B (HAM) Managing Innovation and Value Creation What this paper is about This paper introduces a series of topics that prepares students to manage innovation and value creation in organisations. The tools introduced in the course enables students to create, test, refine, package, and deliver a business opportunity. The knowledge and skills developed in this course are important for all individuals and organisations alike. In the corporate world, these skills are vital for innovative thinking and managing innovation activities. For aspiring entrepreneurs, the course provides the tools of innovation that can be  implemented to start an enterprise. It draws on prior learning in papers on strategic management and change management to provide a template for innovation management. How this  paper will be taught This paper will be offered in a flexi format where students can participate online via Zoom synchronously or on campus in Hamilton. Synchronous Attendance We expect students to participate in all sessions synchronously as some assessments are scheduled at specific times. Although all sessions are recorded, it is expected that students attend and participate in each session to get the maximum benefit from the learning activities. Attendance and participation is noted during each session. Students who cannot attend sessions for legitimate reasons must please notify the paper convenor ahead of time. Timetable Event Name Day Start Time End Time Location Lecture 1 Mon 14:00 17:00 L.G.01 What you will study Topic 1. Introduction to Innovation 2. Types of innovation & Design Thinking: Empathy 3. Jobs to be Done & Design Thinking: Define 4. Entrepreneurship & Design Thinking: Ideate 5. Entrepreneurship process & Design thinking: Prototype and Test 6. Introduction to Blue Ocean Strategy 9. Blue Ocean: 2. Analytical Tools and Frameworks & 3. Reconstruct Market Boundaries 10. Blue Ocean: 4. Focus on the Big Picture, Not the Numbers & 5. Reach Beyond Existing Demand 11. Blue Ocean: 6. Strategic sequence 12. Blue Ocean: 7. Overcoming Hurdles & 8. Build Execution into Strategy 13. Blue Ocean Traps 14. Group work

$25.00 View

[SOLVED] Assignment 8 Matlab

Assignment 8 • Available after Mar 29 at 4pm This assignment is to completed individually. Please review the standards for academic integrity in the syllabus. This assignment asks you to implement the quicksort algorithm. Then it asks you to generate some data about the performance of the insertion sort, quicksort and mergesort algorithms and create a hybrid sort. Note: You are allowed to work on these programs on your local computer. However remember to make sure that your programs work correctly on the Khoury Linux machines. We will be grading your assignments on those machines only! 1 Quicksort Implement the quicksort algorithm to sort an array of integers in non-descending order. Your implementation should have the following characteristics: 1.   It should choose the pivot randomly between the stated range of indices. For each time the quicksort algorithm is invoked to sort an array, it should set the seed for C's random number generator to 200. 2.   You may choose to implement either Hoare's or Lamuto's partitioning scheme. 3.   The function should have the prototype: void quicksort(int *A,int size) in a file named quicksort.h and implemented in quicksort.c . Write tests for this algorithm in tests_quicksort.c. You are required to test the above function, but not any helper functions (e.g. the partitioning function). 2 Mirror Mirror on the Wall, Who's the Best Sort of them All? We have learned about several sorting algorithms. It is time to see the practical performance of these algorithms, especially relative to each other. This will allow us to monitor which sorting algorithm practically works best, for random data of different sizes. 2.1 Preparation You should start by preparing the following: 4.   Implement the in-place insertion sort algorithm as void insertionsort(int *A,int size) in insertionsort.h and insertionsort.c . No tests are expected, but you should probably write your own to verify that your code works. 5.   Implement the mergesort algorithm (you can choose any one of top-down or bottom-up) as void mergesort(int *A,int size) in mergesort.h and mergesort.c . You may choose to use your earlier implementation and change it accordingly for this purpose. 6.   All sorting algorithms should sort in non-descending order. 7.   Write a helper function that generates random data for you: int *random_data(intn) that creates and returns an array of size n of random numbers. This will help you to quickly generate data of the required sizes. You can put this function in an appropriately chosen file. Verify that the helper function works, and each of the sorting algorithms themselves work correctly before proceeding. 2.2 Data Generation In this part, you should incorporate the logger provided to you earlier to measure the number of operations in each sorting algorithm. Here is the cost model you should use: •    Each arithmetic operation on one or two integers costs 1 (e.g. add, subtract, multiply, divide, mod, etc.) •    Each arithmetic comparison on one or two integers costs 1 (e.g. greater than, equal to, not equal to, etc.) • Each assignment between numbers costs 1 • Each call to a function (excluding what the function does) costs 2 • A return statement costs 1 • Any other operation not covered above should cost 1 Incorporate the logger using pre-compiler directives so that it is possible to disable the logger when needed through conditional compiling. Now generate data about the cost of each sorting algorithm to sort random data of various sizes. Keep in mind the following: •    For a given size, make sure that you use the same data as input to all sorting algorithm. That way you can directly compare them to each other. •    For a given size, make sure you try several sets of random data to minimize the bias of the data on the sorting algorithm. Try at least 5 sets for each size. •    Be careful about the sizes you use. Make sure to sample small sizes well (i.e. don't jump from 2 to 500), and also make sure to include some large sizes (500000 or more). Tabulate the costs for each sorting algorithm across different sizes. For 5 extra credit points , plot the costs as line graphs (size of array vs cost for each algorithm), so that you can compare the performance more easily! You may choose to use Excel or any other program for the actual data tabulation and graphing. For this part, your submission should include (at least): 8.   The code that sets up the data generation. Note that you can set up most of the above in a program, so that you don't have to actually run the program manually several times to capture all the data. You are a programmer now: why do manual work when you can automate! You do not have to write tests for this code itself, but your code should be commented, and should be free of memory leaks. 9.   A PDF document that briefly explains how you generated the data, a table of cost of each algorithm per size of the array, and finally your conclusions about which sorting algorithm is the best. Please put your conclusions in a clearly separated section, so that a reader does not have to read the entire explanation to hunt for your conclusion. Note that you do not have to conclude that one algorithm is the best of them all (chances are, it won't be!). Your conclusion must be supported by the data and a justification by you.  You can include the graphical plot(s) if you are attempting the extra credit. 3 A Hybrid sort You may find that the mergesort algorithm takes more time than insertion sort for smaller arrays (if you do not find this in your data, you may not have enough samples of small sizes!). It may be advantageous to take a hybrid approach to sorting: 10.Start with mergesort 11.When the sub-array size becomes "small enough", switch to insertion sort to sort only that sub-array instead of continuing with mergesort. Note that the algorithm is dynamic: it chooses to switch to insertion sort in the middle of sorting an array. This is different from choosing one algorithm or the other at the very beginning by looking at the size of the overall array. For example, the original array may be of size 10000, and yet sorting it may invoke insertion sort at several places. The tricky part is knowing "when" to switch to insertion sort. You can use your samples from the earlier part (or generate more) to empirically determine the crossover point. This will be a size of the input below which insertion sort is faster than mergesort, but above which mergesort is faster than insertion sort. Please note that due to sampling and randomization, you may not find a clear crossover point. But we don't need to be very accurate, so choose a point above which mergesort clearly wins. To implement the hybrid sort, you may have to follow these steps: 12.Write a version of insertion sort with this prototype: void insertion_sort(int *A,int left,int right) . This version only sorts the array A[left..right] (indices included). 13.Write a new version of the hybrid mergesort: void hybrid(int *A,int size) , and its corresponding helper functions. This uses the mergesort algorithm normally, but switches to the above insertion sort for all sub-arrays of sizes at or below your crossover point. With this in place, re-run the data generation from the earlier section for this hybrid. Now tabulate the results comparing only pure mergesort, and this hybrid mergesort. For this part, your submission must include: 14.Your implementation of the hybrid sort, divided into files suitably. 15.The PDF document with the extra tabulated data, along with a brief discussion of how  you chose the crossover point and your conclusions from the data you generated. This does not have to be in a separate PDF file, but you may choose to separate this into another section . After completing this part, you would have created your own hybrid sort! What to Submit Please submit the following: • Source code, suitably styled and commented. • Tests for the quicksort algorithm only. • A PDF document with all the details mentioned above. The autograder for this assignment will only check for your quicksort implementation. This means that there is no help to determine if your code works correctly, nor will the server flag any missing files! Please make sure your submission is complete.

$25.00 View

[SOLVED] FN3142 Quantitative finance Summer 2022 SQL

FN3142 Quantitative finance Summer 2022 Question 1 Consider a process Xt  that resembles an AR(1) process except for a small twist: Xt  = (−1)t δ0 + δ1Xt−1 + εt , where εt  is a zero-mean white noise process with variance σ 2  and δ1  ∈ (−1, 1). (a) Calculate the conditional and unconditional variances of Xt , that is,  Vart−1 [Xt] and Var [Xt].        [20 marks] (b) Derive the autocovariance and autocorrelation functions of this process for all lags as functions of the parameters δ0  and δ1 .    [30 marks] (c) Explain what covariance stationarity means. Does Xt  satisfy the requirements?   [15 marks] (d) Calculate the 1- and 2-period ahead conditional and the unconditional expectations of Xt , i.e., Et−1 [Xt], Et−2 [Xt], and E[Xt].  Comment on your findings.      [20 marks] (e) Consider now another process given by Wt  = δ0  + δ1 (−1)t Wt−1 + εt . Can this process be covariance stationary? Explain.        [15 marks] Question 2 (a) Define Value-at-Risk.  What are its pros and cons relative to variance as a measure of risk? Explain in detail.       [15 marks] (b) Consider a portfolio consisting of a $50,000 position in asset K and a $150,000 position in asset L. Assume that returns on these two assets are i.i.d.  Gaussian with mean zero, that the daily volatilities of these two assets are 1% for asset K and 2% for asset L, and that the coefficient of correlation between their returns is 0.2. (i)  What is the 10-day VaR at the 1% critical level for the portfolio? (ii)  Compare  your  answer  above  to  the  1%  critical  level  VaRs  that  we  would  have  on investing in K and L assets separately.  By how much does diversification reduce the VaR?           [15 marks] For parts  (c) to  (f), consider a dummy variable ut  that takes value  1 when a daily loss is exceeding the VaR threshold on date t and 0 otherwise.   Suppose that you build such a variable for three VaR models that are constructed using (i) a simple MA (moving average), (ii) an EWMA (a model called “exponentially weighted moving average”) and (iii) GARCH volatility estimates and use the critical value 1%.  Suppose further that you use this dummy variable to run the following regressions: ut  = γ0 + εt and obtain the  (volatility-model  dependent) estimates in the table below,  with standard errors in parentheses: (c) Explain how the above regression outputs can be used to test the accuracy of the VaR forecasts from these models (on their own).      [20 marks] (d) How do the empirical performances of the three methods for constructing the VaRs compare? Explain.       [15 marks] (e) Explain how you could compare the relative performances of the VaR forecasts.           [20 marks] Suppose now that you use the dummy variable to run the following regressions: ut  = γ1 + γ2ut−1 + εt and obtain the (volatility-model dependent) estimates in the table below, with standard errors in parentheses: (f) Briefly explain how the above regression outputs can be used to evaluate the accuracy of the VaR forecasts from these 3 models (on their own).                 [15 marks] Question 3 (a) What is volatility clustering?  Suggest tests for it. Explain your answers in detail.            [20 marks] (b) Explain  Black’s  observation  about the  “leverage  efect,”  i.e.,  the  link  between  stock returns and changes in volatility, and provide an explanation for this efect.           [20 marks] (c) Does a simple GARCH(1,1) model capture the leverage efect? Explain.             [20 marks] (d) Describe two GARCH-type models that account for the leverage efect in your own words. Note:  For full marks,  write down the processes with equations and explain analytically how they work.              [20 marks] (e) Consider the volatility model called EWMA (“exponentially weighted moving average”) model of volatility: σt(2) = λσt(2)−1 +(1 − λ)rt(2)−1 ,                                             (1) which formally looks like a special case of the GARCH(1,1) with setting ω = 0, α = λ, and β = 1 − λ . (i)  Show why this formula corresponds to weights assigned to the rt(2)  that decrease expo- nentially as we move back through time  (rt  is the percentage change in the market variable between day t − 1 and day t). (ii)  What undesirable property does this model have compared to GARCH(1,1) based on the parameter values? Explain.  [20 marks] Question 4 (a) What is the efficient market hypothesis statement according to Malkiel (1992)?  Explain in your own words.         [20 marks] (b) Black (1986) gives an alternative definition of market efficiency.  What is it and why is Black’s definition difficult to test? Explain in your own words.            [20 marks] (c) Suppose we are at time t,  and we are interested in the efficiency of the market of a given stock.  Let Ωt(w)  denote the weak-form efficient markets information set at time t,  Ωt(ss) denote the semi strong-form efficient markets information set at time t, and Ωt(s)  denote the strong-form efficient markets information set at time t. To which information set, if any, do the following variables belong? Explain. 1.  The nominal size of the short position Melvin Capital (a hedge fund) currently has in a given stock. 2.  The size of the long position in Gamestop shares purchased today by DeepF, a user of the subreddit r/WallStreetBets 3.  The current 3–month US Treasury bill rate. 4.  The value of the stock at time t +2.                                    [20 marks] (d) Explain how  “unit root” models and models with time trends look like.  What are the similarities and differences between these models?                                   [20 marks] (e) Explain a way how one can test for unit root.                           [20 marks]

$25.00 View

[SOLVED] CA 1 Satellite Missions for Earth

CA 1 – Satellite Missions for Earth Observation and Sustainability! Objective: Analyze key Earth observation satellite missions and their contributions to sustainability, focusing on how the data generated can be used to address challenges such as climate change, urbanization, biodiversity loss, and natural resource management. Scope: 1. Highlight FOUR existing and ONE upcoming significant Earth Observation missions. 2. Discuss their technological capabilities (e.g., multispectral imaging, LiDAR, radar) and the type of data they provide. 3. Explain how this data is applied to support the UN Sustainable Development Goals (SDGs), such as: ? Monitoring deforestation (SDG 15: Life on Land). ? Analyzing urban sprawl (SDG 11: Sustainable Cities and Communities). ? Assessing water resource availability (SDG 6: Clean Water and Sanitation). ? Tracking climate change impacts (SDG 13: Climate Action). Requirements: ? Word limit – 500 words! ? Size 12 font (Aptos/Times New Roman/Calibri), Single Spacing ? Deadline for submission 25 January 2025, 11:59 PM!

$25.00 View

[SOLVED] FINA3326 APPLIED FINANCIAL MANAGEMENT 2024 Statistics

FINA3326 APPLIED FINANCIAL MANAGEMENT GROUP PROJECT (2024) Derivatives in Risk Management Stulz (2004) concluded “that even though some serious dangers are associated with derivatives, they have made us better off and will keep doing so” (p. 174). Since then, we have had, among other notable events, a great recession, a sovereign debt crisis, and a COVID-19 recession. Stulz (2023) recently wrote that “Taking financial positions to protect a firm against financial distress costs arising from crises would be expensive if it were at all feasible. Not all firms could enter such positions since in equilibrium we cannot all hedge with financial instruments against crisis risk” (p. 1396). Given the turbulent nature of our world today, we will examine the role of derivative use by multinationals. Question: Can value be added to a multinational corporation by using derivatives in their risk management AND how is it that corporations can control risk in a world of crises? At a minimum, consider these sources: Bachiller, P., Boubaker, S., & Mefteh-Wali, S. (2021). Financial derivatives and firm value: What have we learned? Finance Research Letters, 39, 101573. Bae, S. C., & Kwon, T. H. (2021). Hedging operating and financing risk with financial derivatives during the global financial crisis. The Journal of Futures Markets, 41(3), 384–405. Bartram, S. M. (2019). Corporate hedging and speculation with derivatives. Journal of Corporate Finance (Amsterdam, Netherlands), 57, 9–34. Geyer-Klingeberg, J., Hang, M., & Rathgeber, A. (2021). Corporate financial hedging and firm value: a meta-analysis. The European Journal of Finance, 27(6), 461–485. Stulz, R. M. (2004). Should We Fear Derivatives? The Journal of Economic Perspectives, 18(3), 173–192. Stulz, R. M. (2023). Crisis risk and risk management. European Financial Management, 29, 1377–1400. Written Report Due date and Submission: 11:59pm, Oct 10, 2024, via Turnitin on LMS NOTE: Only the student who submits the project will be able to view feedback on LMS. Please share the feedback file with the rest of your group. The marks will be manually allocated to all group members on LMS after SPARK adjustments. Please submit your work as a PDF. Format: A4-pages. Font size: 12, double spacing, Normal margins (about 2.5cm top, bottom, left and right) Maximum Length: 2,500 words (Appendices of tables & graphs can be added and are not in the word count – their use is recommended!). No limit on the use of appendices. Your references pages need not be included in the word count. Structure You have two choices here. (1) You may approach it as answering the question with the use of an example, basically combine everything. (2) You may split the report into two sections: (a) Literature review – answer the question (b) A separate analysis of a multinational – but if you take this approach, you must discuss if your example is consistent with your overall hypothesis and why. Reference – Reference your work! Use APA 7 referencing style. https://guides.library.uwa.edu.au/apa SPARK SPARK will be used to provide peer feedback and mediate group marking. Please familiarise yourself with the SPARK documentation contained in the Assignment/SPARK-Information folder on LMS. In addition, a short summary is included on the final page of this pdf. Groups Must be formed within tutorials. Maximum members 4. NOTES: There are two parts to this project. First, you are making an argument that needs to be supported with reference to the literature. You may choose to argue for or against the proposition that value is added. If arguing for, then explain how. If arguing against value being added, then explain why. You need to consider this question in the light of recent crises. The second part of this project is an analysis of a multinational corporation. Your report must include a current / recent example of a multinational corporation which has significant foreign operations and uses derivative securities in their exposure management. PART 1 Review the literature in the area to support your argument. • Significant emphasis here (see marking guide). • Include only relevant literature. • You must include recent literature in your explanation (note that Stulz was writing pre-financial crisis – consider, did this event validate his approach or change it?). A sample (just a small sample) of relevant papers is listed above. • Explain any weaknesses in the argument for adding (or not adding) value. PART 2 Discuss an example of one (one only) multinational corporation. • As you only have one company this is anecdotal evidence and should not be taken as proof. Instead, you should discuss whether this anecdotal example is consistent or inconsistent with your overall thesis. a. Describe the foreign exchange risk exposures that this company faces. What types of exposures are they and what are their magnitudes? i. You should try to be as specific as you can here. 1. What are their assets? Where are they held? 2. How are their cash flows being generated? In what currencies? 3. How significant to the overall business are these exposures? 4. In summary, can you explain the business model of the company and the exposures to which this business is faced? b. Describe how the company manages their exposures. c. Decide whether this has been successful. i. In deciding this you should include your own quantitative analysis 1. This section is open to your imagination, however reading the assigned textbook readings and reading Stulz (2004) may provide you with some ideas… ii. In deciding whether it has been successful you may also include sources, whether external to the company, or from the company’s own reporting – however these must all be properly referenced! Remember the primary overall question above. Structure your report as an answer to this question. The corporation is just an example. You will not necessarily be helped or hindered by finding a corporation that matches the argument that you are trying to make. If your empirical example does not support the argument that you are making, then you have found something to discuss - similarly you should discuss if your example turned out to be consistent with your argument. You will not be judged by whether your company matches your thesis. You will be judged by the strength of your discussion and the consistency of your interpretations and conclusions. • The choice of company is important, spend time here early on to make sure you have chosen a company where you are able to source sufficient information. • Full marks may be achieved regardless of whether your anecdotal evidence is consistent with your overall thesis. ***Required Groupwork Planning Document*** Due date and Submission (This component only): Due 11:59pm, September 10, 2024, via LMS (as PDF) Maximum Length: 1 page Format: A4-page. Font size: 12 Times New Roman, double spacing, Normal margins (about 2.5cm top, bottom, left and right) To be included: • Company to be analysed • Group members • Team organisation / Member roles • Member expectations • Expected outcomes / Group member performance dates Marks Breakdown • Clarity of Report (Writing / General Presentation / Graphs / Tables / Use of Appendices) (4 marks) • Literature Review (Coherence, relevance, comprehensiveness, primarily peer-reviewed) (5 marks) • Company Qualitative Analysis (Company research, business model, exposure measurement) (3 marks) • Company Quantitative Analysis (3 marks) o Explanation of whether the business has been successful in their foreign exchange risk management o This must include an analysis appendix (not in the word count) clearly detailing: ▪ Your data sources ▪ Any modifications to your data before use ▪ Methodology – how were your outputs generated? • Overall cohesion, structure, and persuasiveness of your report (e.g. does it read as one submission, or as 4 reports stuck together the day before submission?) (2 marks) • Referencing (this will be strictly marked – reference correctly) (1.5 marks) • Groupwork Planning Document (Due earlier) (1.5 marks)

$25.00 View