15,161 reputation
12986
bio website quantdec.com
location Northeastern US
age 14
visits member for 2 years, 7 months
seen Aug 27 at 19:17

Consultant (environmental and spatial stats a specialty), expert witness, and teacher. I can be reached through (outdated but still valid) links posted on my web site.

Twitter: @WilliamAHuber // ASA-P website: http://amstatphilly.org/


Why waste time learning, when ignorance is instantaneous?

--T(iger) Hobbes.

For any complex problem there is a simple solution. And it's always wrong.

--[Mis?]attributed to H.L. Mencken by Dava Sobel, Longitude.


May
7
comment Multiplying two dimensional data by a constant
+1. Multiplying by a diagonal matrix is fast for up to somewhere between $100$ and $1000$ columns; beyond that, a solution modeled after Transpose[{1, 2} * Transpose[a]] becomes superior. Even better for such large matrices is a . SparseArray[Band[{1, 1}] -> {1,2}]; this is superior to both once there are $20$ columns or so.
May
7
comment Why can't I change the value of MaxRecursion in NIntegrate when integrating BesselJ?
Depending on your accuracy needs, approximate $\tanh(z)\approx 1$ for $z$ sufficiently large, such as $z\gg 20$. This works because $1 - \tanh(z)$ decays exponentially. The integral of $J_0$ can be evaluated in closed form, so numerical integration is needed only for the product of the Bessel function with $\tanh(z)-1$ from $0$ to this small threshold.
May
7
awarded  Nice Answer
May
7
reviewed Close why there is a small imaginary part
May
6
reviewed Close Scaled ColorData Function
May
6
comment Calculate variance of random walk?
Essentially all the work needed to solve this takes place in order to write it down in Mathematica. $Z_i$ has a Bernoulli distribution that is shifted in mean and rescaled. Its variance will therefore be the variance of a Bernoulli distribution multiplied by the square of the scale factor. One way to obtain the scale factor is by looking at the relative range: $(1-2k-(-1))/(1-0)=2-2k$. If you don't know the variance of a Bernoulli distribution you would then type Variance[BernoulliDistribution[p]](1-2 k-(-1))^2. $X_t$, being the sum of $t$ of these, will have $t$ times the variance.
May
6
reviewed Close Reversing axes to get Poiseuille profile
May
5
awarded  Sportsmanship
May
5
comment Image of first quadrant under $f(z)=(z+i)/(z-i)$
+1: correct, informative, detailed, and rather pretty, too!
May
5
awarded  Enlightened
May
5
awarded  Nice Answer
May
3
answered Image of first quadrant under $f(z)=(z+i)/(z-i)$
May
3
comment Checking if an expression is equal to zero
If you insist! But then please change the title of the question. Notice, too, that your expression does not check that six points are coplanar: it doesn't even involve two of them. If you want an effective method of checking, then the answers (and comments) in the duplicate question will serve you better.
May
3
comment Calculate variance of random walk?
This isn't really a question about Mathematica; it's a math-stat question. The answer is that the variance of $X_t$ is the sum of the variances of the $Z_i$ and the variance of $Z_i$ equals $p(1-p)(2-2k)^2$.
May
3
comment Checking if an expression is equal to zero
possible duplicate of How to check if a 3D point is in a planar polygon?: the solution to that one requires an initial check that answers the present question.
May
2
comment Problem using replace to simplify logarithms
70 threads are listed in the search for simplify+log. Many of them answer this question in various ways.
May
2
answered Representing a Stencil of a Finite Difference Operator with Mathematica's Graphics3D
May
2
comment Assuming monotonicity and concavity
Could you clarify what you mean by "evaluate"? Have a, u[10], and q been given definite real values or do you want to find combinations of them for which the inequality might be true for some phi?
May
2
reviewed Leave Closed Adapting NDSolve to circumvent NDSolve::bdord: error for 1-D Euler Equations
May
1
comment PolynomialRemainder memory
Could you amplify this answer and show how your suggestion would work in Mathematica? It's especially puzzling that the reference you give makes no mention at all of polynomials.