Hot answers tagged

6

Below is an extended comment showing the effects that can happen when one ignores the correlations among parameter estimators (either on purpose or because journal authors or editors don't know enough about statistics to include necessary information). First I create some data with the same curve form as the function CDDHybrid and a set of predictor values ...


5

Introduction The first thing that I noticed is that the functional form for all of your CDD and LHS functions are identical. I propose that rather than defining six functions for each, we define one function and change the input arguments to cover the various cases. cdd[s_, a_, b_, c_] := 10^(a + b*c - b*s)*Exp[-10^(s - c)] lhs[s_?NumericQ, a_?NumericQ, ...


5

This does what I think you're after, fiddle with options as desired: With[{a = Interval[1.01 + .18 {-1, 1}], b = Interval[.92 + .11 {-1, 1}], c = Interval[2.2 + .2 {-1, 1}]}, Plot[{Min[a + b*x + c*x^2], 1.01 + .92 x + 2.2 x^2, Max[a + b*x + c*x^2]}, {x, -5, 5}, Filling -> {1 -> {3}}, FillingStyle -> Darker, PlotStyle -> {None, Red, ...


5

The syntax you use is wrong. There is no import element called "P" for the MAT format. Take a look at the documentation: it lists the allowed elements: "Elements", "Rules", "Options", "Data", "LabeledData", "Comments", "Labels". You probably want "LabeledData", so use Import["file.mat", {"MAT", "LabeledData"}] or alternatively Import["file.mat", ...


4

The problem is that Expectation does not evaluate to a numeric result in all cases. It's also quite slow. You could replace it by NExpectation in the final integrand. I threw in an extra N for just to be sure. It takes so long to evaluate, I didn't have time to experiment. AverageProbSuccess[B_, \[Lambda]_] := Block[{n = 0, i, Expectation}, ...


4

Could use Filling -> {4 -> {{1}, LightRed}, 1 -> {{3}, LightBlue}, 3 -> {{6}, LightRed}} and omit FillingStyle. Or Filling -> {1 -> {3}, 4 -> {6}}, FillingStyle -> {{LightBlue, Opacity[0.5]}, {LightRed, Opacity[0.5]}} which respectively produce the plots below.


2

It's from the Bessel factor: Cosh[(1 - ϵ) x] /. x -> 10.`40^16 Note that the Bessel function evaluates to Underflow[]:


2

Since your number is quite large, you can use Stirling's approximation to do this. It's also very common to use this approximation in statistical mechanics: For large number $n$ $$\log(n!)\approx n\log(n)-n$$ So in your case $$n=\frac{Nn}{3}$$ then $$ \log\left[\frac{(3n)!}{n!\times n!\times n!}\right]\\ =\log[(3n)!]-3\log[n!]\\ \approx 3n \log(3n)-3n ...


2

Here is what I get when I try your equation: a = 1; b = 0.2; c = 4; y0 = 8.5; v0 = 0; DSolve[{a y''[t] + b y'[t] + c y[t] == 0, y[0] == y0, y'[0] == v0}, y[t], t] (* {{y[t] -> 8.5 E^(-0.1 t) (1. Cos[1.9975 t] + 0.0500626 Sin[1.9975 t])}} *) You may need to restart your kernel and try again.


1

By using SetDelayed (short form :=) to define the function g1 or g2 you prevent the evaluation of b1 or b2 respectively into the assigned expression, so e.g. g1 has for its complete definition: ?? g1 Global`g1 g1[s_]:=Piecewise[b1,0] Parameter substitutions into the right-hand-side are made before further evaluation, and since there is no literal s ...



Only top voted, non community-wiki answers of a minimum length are eligible