# Tag Info

## Hot answers tagged probability-or-statistics

10

In response to Daniel Huber's answer: this is a case of which variance estimator you want to use. The easiest way to see this, is to make the probabilities all the same, so that the weights don't actually do anything: payouts = {7, 3, 1, 0}; probabilities = {1/4, 1/4, 1/4, 1/4}; Total[probabilities] 1 These two are now the same (as they should be): ...

6

You need first to define your region; call it reg. Then, f[t', x, y] for a fixed t' is simply a function of x and y. To get the mean, you may either use Integrate or NIntegrate: Integrate[f[x, y] , {x, y} ∈ reg] / Integrate[1 , {x, y} ∈ reg]

4

This is more of an extended comment. Here is a slight modification of your code: parms = {m -> 1, ω -> 1, ℏ -> 1, α -> 1, n0 -> 8}; quadratures = ProbabilityDistribution[(1/Sum[1/k!, {k, 0, n0}]) * Abs[Sum[(α E^(I ϕ))^n/√(n!) 1/Sqrt[2^n n!] ((m ω)/(π ℏ))^(1/4) * Exp[-((m ω z^2)/(2 ℏ))] HermiteH[n, Sqrt[(m ω)/ℏ] z], {n, 0, n0}]]^2, {z, -...

4

I wonder if your task is to describe the distribution of individual eigenvalues after being sorted by their absolute values (which is what Mathematica does when it returns the 4 eigenvalues). If so the following might be considered: sample = RandomVariate[NormalDistribution[0, 1.2], {10000, 4, 4}]; Tranp = Transpose /@ sample; GOEe = sample + Tranp; Eigs = ...

3

FindFit returns a list of replacements, not a fitted function, so Normal doesn't do anything to it. I think you meant to use NonlinearModelFit there. Nevertheless, it would not have been the right tool for the job, as you are not doing a regression, but you are fitting a distribution to your data. (I've increased the number of matrices in your sample to $10^... 3 The problem is that with the available data and proposed model there are no finite values of the two parameters ($c_1$and$c_2$) that can minimize the sum of squares (which is essentially what NonlinearModelFit uses in this case). In this case lack of numerical precision is not the culprit (although it is one of the usual suspects in many cases). The "... 3$P_v$is a mixture of a continuous random variable and a discrete random variable (with a probability mass at 0). Mathematica's MixtureDistribution requires random variables in the mixture distribution to be all discrete or all continuous (and of the same dimension). The point is that the determination of distributions and associated summaries usually can'... 2 Something like: dist = MultinormalDistribution[IdentityMatrix[2]] pts = RandomVariate[dist, 500]; Graphics[Point[pts], Axes -> True] You may chose a different variance var by e.g.: dist = MultinormalDistribution[ var IdentityMatrix[2]] 2$Version (* "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)" *) Clear["Global`"] There is no need to use Table with RandomVariate to generate multiple values. SeedRandom[1234]; data = RandomVariate[NormalDistribution[], 10^5]; SmoothHistogram[data, Automatic, "PDF", Frame -> True, PlotRange -> All, FrameLabel -...

2

While I think this question should be closed (because the main issue of efficiently generating samples without a loop is found in the documentation of RandomVariate), the following might help: nSim = 10000; n = 5; SeedRandom[12345]; x = RandomVariate[NormalDistribution[0, 1], {nSim, n}]; cov = Covariance[#, 2 #] & /@ x; Mean[cov] (* 2.0006 *) Histogram[...

2

A naive approach might be something like the following: pts = RandomReal[{-10, 10}, {100, 3}]; Manipulate[ Show[ ListPointPlot3D[ pts, Axes -> None, BoxRatios -> {1, 1, 1}, PlotRange -> zoom {{-10, 10}, {-10, 10}, {-10, 10}} ], Graphics3D[{ Blue, Arrow[{{0, 0, 0}, 10 {Sin[\[Theta]], Cos[\[Theta]], ...

1

It is rather straight forward: A bets on $\neg{a}$, $\neg{b}$, and on $a \lor b$. Accordingly, A will receive money, if these propositions are true—which can be seen in the table that tabulates all $2\times2$ possible results. B takes the counter position and the stakes simply map the probabilities to odds (e.g. $p(a) = 0.4 \implies 4:6$), which means A will ...

1

I don't know why you change notation and produce what seems to be a more complicated than necessary version of $g(x)$. If you just add assumptions to the integration, then you'll get an answer with your original code. I would think that defining $g(x)$ as g[x_]:= a (b/(1 + Exp[-μ Ps x/r^α + ϕ]) - 1) would be more straightforward. Here you're using the ...

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