New answers tagged

0

I suspect that you will need to use numeric techniques. Clear["Global`*"] f[x_Integer?NonNegative, μ_?(NumericQ[#] && Element[#, Reals] &), σ_?(NumericQ[#] && # > 0 &)] := NIntegrate[ E^-λ λ^(x - 1) E^(-(Log[λ] - μ)^2/(2 σ^2)), {λ, 0, ∞}]/(Sqrt[2 π] σ x!) mean[μ_?(NumericQ[#] && Element[#, Reals] &),...


3

d1 = NormalDistribution[m1, s1]; d2 = NormalDistribution[m2, s2]; These distributions require that assume = And @@ (DistributionParameterAssumptions /@ {d1, d2}) (* m1 ∈ Reals && s1 > 0 && m2 ∈ Reals && s2 > 0 *) As pointed out by @JimB, the PDF formed by the product of the normal PDFs is PDFprod = Assuming[assume, PDF[d1,...


3

(* Get product of two normal pdf's *) prod= PDF[NormalDistribution[μ1, σ1], x]*PDF[NormalDistribution[μ2, σ2], x]; (* Normalize so that the pdf integrates to 1 *) pdf = prod/Integrate[prod, {x, -∞, ∞}, Assumptions -> {σ1 > 0, σ2 > 0}]; (* Construct associated distribution *) d = ProbabilityDistribution[pdf, {x, -∞, ∞}, Assumptions -> {σ1 > 0,...


2

First question You have to apply Tooltip at the appropriate level. plt2 = ListPlot[Map[Tooltip[#] &, c1, {2}]] Second question Use Association with FindClusters. aDataRecords = Association[#[[1]] -> #[[2 ;; 3]] & /@ datarecords] (* <|"Industry 4" -> {158, 64.4}, "Industry 8" -> {137, 64.4}, "Industry 5" -> {141, 62.8}, "...


2

I know you want the expectation for any positive value of $\kappa$ but here is the resulting expectation for integer values of $\kappa$: mean[κ_, b_, μ_, σ_, ρ_, ω_] := b Exp[μ + σ^2/2] * Sum[Binomial[κ, i] ω^i Exp[i ρ (μ + (1 + i ρ/2) σ^2)], {i, 0, κ}] For example, mean[4, b, μ, σ, ρ, ω] $$b e^{\mu +\frac{\sigma ^2}{2}} \left(\omega ^4 e^{4 \rho \...


4

The expression whose expectation you seek can be expanded as a power series in x. (You might need to worry about whether this converges). expr = b*x*(1 + ω*x^ρ)^κ; coeff = Assuming[κ > 0 && n >= 0, SeriesCoefficient[expr /. x^ρ -> z, {z, 0, n}]]; We see that the power series converges to your original expression. Sum[coeff x^(ρ n), {...


3

The function is Expectation not ExpectedValue. Unfortunately, Expectation[b*x*(1 + ω*x^ρ)^κ, x \[Distributed] LogNormalDistribution[μ, σ]] does not yield an answer. If κ is an integer, it does appear to work: Expectation[b*x*(1 + ω*x^ρ)^3, x \[Distributed] LogNormalDistribution[μ, σ]] (* b E^(μ + σ^2/2) (1 + 3 E^(μ ρ + 1/2 ρ (2 + ρ) σ^2) ω + 3 E^(2 ...


1

positionofcolumns = {0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5}; height = {0.000123464, 0.0086719, 0.119523, 0.394129, 0.36659, 0.105748, 0.00521382}; You can use WeightedData with height as the weight vector: wd = WeightedData[positionofcolumns, height] SmoothHistogram[wd] skd = SmoothKernelDistribution[wd] Plot[PDF[skd, x], {x, 0,.8}]


2

Given any three of the five magnitudes $P(A), P(B), P(A\cap B), P(A|B), P(B|A)$, the remaining two are determined thru well known relations. We generate the first three randomly. SeedRandom[777] {pa, pb} = RandomReal[{0, 1}, 2] {0.183545, 0.903397} pab = RandomReal[{0, Min[pa, pb]}] 0.138116 {pbconda, pacondb} = pab/{pa, pb} {0.752495, 0.152886}...


6

Usually, this works: Generating random probabilities: SeedRandom[12]; ( Label["Beginning"]; PA = RandomReal[{0, 1}]; PB = RandomReal[{0, 1}]; PAcondB = RandomReal[{0, 1}]; PAandB = PAcondB PB; PBcondA = PAandB/PA; If[PB + PA - PAandB > 1. || PBcondA > 1., Goto["Beginning"];]; ) Determining disks for the events A and B and a region of area 1 ...


0

This is a specific function which can be modified for any PDF you like. (It looks horrible because i wrote it.) Set PrintDistributionAndFitOpt -> True to see the plot. Otherwise it just returns the fit. Clear[GetGaussianFitToDataDistribution]; Options[GetGaussianFitToDataDistribution] = { UseNumberBinsOpt -> 50 ,PrintDistributionAndFitOpt -> False ...


2

The OP writes: "It is important to know what is the analytical form of the function (plotted in blue color) given, which is approximated by the Histogram" It might be difficult to find the analytical form of sf. But we can approximate the analytical form quite easily by noting that your data appears exponentially downward sloping, but bounded on (0,2). So a ...


5

Use Show: Show[ Histogram[sf, {0.25}, "Probability"], Plot[f, {k, 0, 2}] ]


Top 50 recent answers are included