probability or statistics – Plotting Gaussian using a formula

I am able to plot a Gaussian distribution of mean 10 and Standard deviation using below code.

ListLinePlot(Table(PDF(NormalDistribution(10, 2), x), {x, 0, 20}), 
 PlotMarkers -> {Automatic, 10}, PlotStyle -> Blue, Frame -> True, 
 FrameStyle -> Directive(Black, 15))

But when I use a formula,
I can’t get a plot when I write a code as follows:

(Lambda) = .125
a = 10
(Rho)(x_) := A*Exp(-(Lambda)*(x - a)^2)
Replace((Rho)(x), A -> Sqrt((Lambda))/Sqrt((Pi)), All)
Plot((Rho)(x), {x, 0, 20})

Here dd

numerics – How to verify the integral remainder of this integral formula?

The following questions are from the 2018 professional course test of numerical analysis of 武汉岩石所:

enter image description here

For the integral formula $int_{0}^{h} f(x) d x approx frac{h}{2}(f(0)+f(h))+alpha h^{2}left(f^{prime}(0)-f^{prime}(h)right)$:

1. We need to determine the value of $alpha$ to make it have the highest algebraic accuracy.
2. Suppose that the integrand f(x) has the fourth order continuous derivative, it needs to be verified that when $alpha=frac{1}{12}$, the integral remainder of this formula is $R(f)=frac{1}{720} h^{5} f^{(4)}(eta), quad eta in(0, h)$.

Outer(Construct, {h/2 &, h/2 #1 &, h/2 #1^2 &, h/2 #1^3 &}, {0, 
     h}).{1, 1} + 
  Outer(Construct, {0 &, α h^2/2 &, α h^2/
       2 2 #1 &, α h^2/2 3 #1^2 &}, {0, h}).{1, -1} == 
 Integrate({1, x, x^2, x^3}, {x, 0, h})

From the results of the above code, I can know that when $alpha=frac{1}{6}$, the integral formula $int_{0}^{h} f(x) d x approx frac{h}{2}(f(0)+f(h))+alpha h^{2}left(f^{prime}(0)-f^{prime}(h)right)$ has the highest algebraic accuracy. But for the second question, I don’t know how to verify it with MMA. I want to get as many methods as possible to verify the second problem.

pr.probability – Generalized regression formula

Definition of regression formula:For $tgeq s$, $langle X(t)Y(s)rangle=TrXPhi_{t-s}(YPhi_{s}(rho))$ and for $sgeq t$, $langle X(t)Y(s)rangle=TrYPhi_{s-t}(Phi_{t}(rho)X)$.

Generally speaking, the generalized regression formula defines not all correlation functions.
For which $tgeq0$, $sgeq0$ , $rgeq0$ the generalized regression formula does not allow you to define $langle X(t)Y(s)Z(r)rangle$?(In the answer supposed inequality or a set of inequalities for 𝑡, 𝑠, 𝑟.)

I am also searching an elementary reference on these subjects.

recurrence relations – Finding the closed form of a recursive formula using repeated substitution

I am trying to find the closed form of the following recursive function by repeated substitution:
7 & n=0\
25 & n=1\
2T(n-1)+3T(n-2) & nge 2

So far, I have:
&=2^3 T(n-3) + 3 cdot 2^2 cdot 3T(n-4) + 3 cdot 2 cdot 3^2 T(n-5) + 3^3 T(n-6)\
&=sum_{i=0}^{k}binom{k}{i}2^{k-i}cdot 3^{i}cdot T(n-(k+i))

where $k$ is the number of substitutions made.

I am not sure how to get from this to a closed form. I know I am supposed to find a pattern, but I do not see one. How can I get the closed form of this function using repeated substitution?

theory – Why is the Schnorr verification formula working and actually verifying the validity of a signature?

To prove the validity of the signature we must see that the tuple (R,s) actually came from the private key x in particular s was derived as s=r+cx. Obviously we should not possess x (which is the reason why we need this verification equation) so

  1. Looking at gs = RXc we relize that we know (R,s), X and c. (Since c = H(X,R,m) and the public key X is obiously public and known. As the generator g is also know this means we can actually compute both sides of the equation.
  2. Since s=r+cx we know that gs = gr+cx
  3. Since we do these calculations in a cyclic group of prime we can apply the following laws: ga + b = gagb and gab = (ga)b (As far as I understand this is the reason why the group needs to be cyclic and of order)
  4. Thus gs = gr+cx = grgcx
  5. Recalling R = gr and entering to the equation from 4. we get gs =R gcx
  6. Recalling the other law from 3. we have gs =R gcx = R(gx)c = RXc

This is exactly the equation that was supposed to be shown.

Note the interesting fact that as mentioned in 1. the data to verify the equation is known but producing the data can only work if x and r are known. That is why the owner of x can produce the signature and others can verify it.

google sheets – Increment number in array formula based on a condition

I have a data set with Sub-Total rows at various intervals. As the data can have rows inserted or deleted, I am trying to use an array formula to give each group of data an incremented integer as a reference number.

Example Data:

Column A:  

When using a filled-down formula I can place ‘1’ in B1, then =if(A1="Sub-Total",B1+1,B1) in cells B2 and down. This yields the following in column B:


I have tried:


But the FALSE condition does not seem to reference the row above and shows as blank.

I have also tried using OFFSET(), but with no luck.