New answers tagged

1

ClearAll[f] f[n_, l_, h_] := Module[{r = Subdivide[l, h, n - 1]}, MapIndexed[{#, Mean[Drop[r, #2]]} &, r]] ListPlot[Callout[#, {##}]& /@ f[6, 11, 21]]


2

Probably easiest to just manage this as a list: list[l_, h_, n_] := Table[x, {x, l, h, (h-l)/(n-1)}]; ListPlot[Table[Mean[Drop[list[1, 10, 10], {i}]], {i, 1, 10}] If you really want to do this with sums, it'd be possible to modify the formula slightly by subtracting off the missing term: 1/(n - 1) (Sum[x, {x, l, h, (h - l)/(n - 1)}] - ((h - l)/(n - 1) ...


1

The maths is very simple. For any list ls ls = Range[1, 19]; m = Mean[ls] (* 10 *) we can "downdate" our estimate of the mean x = 15; Mean[Complement[ls, {x}]] == Module[{n = Length[ls]}, (n m - x)/(n - 1)] (* True *)


2

Clear["Global`*"] Use TransformedDistribution to find the distribution for the sum. Assuming that the x[i] are independent and identically distributed dist[p_, n_Integer?Positive] := TransformedDistribution[Sum[x[i], {i, 1, n}], Table[x[i] \[Distributed] BernoulliDistribution[p], {i, 1, n}]] dist[p, #] & /@ Range[5] (* {BernoulliDistribution[p], ...


2

I hope you don't need the exact fractions that come out of these calculations, because the numbers become so huge that Mathematica spends a lot of time working with them. I'll give a solution to machine precision. The fastest way is to make use of vectorized operations (functions that act on whole lists at a time, rather than looping through individual ...


3

The culprit is Sum`SumConvergenceDump`UnivariateLogarithm[], which mistakenly decides the sum is not convergent. It should be reported as a bug. (It would be acceptable if it couldn't decide, but to reach the wrong conclusion is wrong.) Here's a modest implementation of the limit comparison test within the log-testing code. It uses the Villegas-Gayley ...


0

Perhaps Fold[Sum[#, {m[2, #2], -b, b}] &, f[m[2, 1], m[2, 2]], {2, 1}] TexForm @ % $\sum _{m(2,1)=-b}^b \left(\sum _{m(2,2)=-b}^b f(m(2,1),m(2,2))\right)$


0

I think what you need is Sum[f[M[2, 1], M[2, 2]], Evaluate[Sequence @@ Table[{M[2, i], -Border, Border}, {i, 1, 2}]]]


Top 50 recent answers are included