weidade37211

85 Reputation

4 Badges

2 years, 248 days

MaplePrimes Activity


These are replies submitted by weidade37211

@acer @Carl Love  thanks both. Just to confirm, so the essential idea is to make the float-point exponent a fraction?

Am I nitpicking or indeed this is a wired bug of Maple?

@acer And the ``Digit'' was a typo that I should find out before I post this question. But thanks for your reply that is very sufficent

@Kitonum Thanks, but what is the difference behind the two ways..

@acer 

Thanks.

 

Sorry for being slow, could you please explain more on ``purely numeric integration VS symbolic integration''? is it simply use the int(blah, x=0..1, numeric=true)?

@acer 
 

NULL

NULL

NULL

restart

NULL

Digits := 40

40

(1)

NULL

with(Statistics)

[AbsoluteDeviation, AgglomeratedPlot, AreaChart, AutoCorrelation, AutoCorrelationPlot, BarChart, Biplot, Bootstrap, BoxPlot, BubblePlot, CDF, CGF, CentralMoment, CharacteristicFunction, ChiSquareGoodnessOfFitTest, ChiSquareIndependenceTest, ChiSquareSuitableModelTest, ColumnGraph, Correlation, CorrelationMatrix, Correlogram, Count, CountMissing, Covariance, CovarianceMatrix, CrossCorrelation, Cumulant, CumulantGeneratingFunction, CumulativeDistributionFunction, CumulativeProduct, CumulativeSum, CumulativeSumChart, DataSummary, Decile, DensityPlot, Detrend, Difference, DiscreteValueMap, Distribution, ErrorPlot, EvaluateToFloat, Excise, ExpectedValue, ExponentialFit, ExponentialSmoothing, FailureRate, FisherInformation, Fit, FivePointSummary, FrequencyPlot, FrequencyTable, GeometricMean, GridPlot, HarmonicMean, HazardRate, HeatMap, Histogram, HodgesLehmann, Information, InteractiveDataAnalysis, InterquartileRange, InverseSurvivalFunction, Join, KernelDensity, KernelDensityPlot, KernelDensitySample, Kurtosis, LeastTrimmedSquares, Likelihood, LikelihoodRatioStatistic, LineChart, LinearFilter, LinearFit, LogLikelihood, LogarithmicFit, Lowess, MGF, MLE, MakeProcedure, MaximumLikelihoodEstimate, Mean, MeanDeviation, Median, MedianDeviation, MillsRatio, Mode, Moment, MomentGeneratingFunction, MovingAverage, MovingMedian, MovingStatistic, NonlinearFit, NormalPlot, OneSampleChiSquareTest, OneSampleTTest, OneSampleZTest, OneWayANOVA, OrderByRank, OrderStatistic, PCA, PDF, ParetoChart, Percentile, PieChart, PointPlot, PolynomialFit, PowerFit, PredictiveLeastSquares, PrincipalComponentAnalysis, Probability, ProbabilityDensityFunction, ProbabilityFunction, ProbabilityPlot, ProfileLikelihood, ProfileLogLikelihood, QuadraticMean, Quantile, QuantilePlot, Quartile, RandomVariable, Range, Rank, Remove, RemoveInRange, RemoveNonNumeric, RepeatedMedianEstimator, RousseeuwCrouxQn, RousseeuwCrouxSn, Sample, Scale, ScatterPlot, ScatterPlot3D, Score, ScreePlot, Select, SelectInRange, SelectNonNumeric, ShapiroWilkWTest, Shuffle, Skewness, Sort, Specialize, SplitByColumn, StandardDeviation, StandardError, StandardizedMoment, SunflowerPlot, Support, SurfacePlot, SurvivalFunction, SymmetryPlot, Tally, TallyInto, TreeMap, Trim, TrimmedMean, TwoSampleFTest, TwoSamplePairedTTest, TwoSampleTTest, TwoSampleZTest, Variance, Variation, VennDiagram, ViolinPlot, WeibullPlot, WeightedMovingAverage, Winsorize, WinsorizedMean]

(2)

NULL

Define the 3 profiles:

 

t := Array([.1, .3, .6])

Array(%id = 18446745739414130310)

(3)

o := Array([.2, .1, .7])

Array(%id = 18446745739414124534)

(4)

n := 1000

1000

(5)

ni := Array([.3*n, .3*n, .4*n])

Array(%id = 18446745739414119958)

(6)

ArrayNumElems(t)

3

(7)

ni[3]

400.0

(8)

NULL

Now set g(x) which is a beta distribution with the two parameter a, b as:

 

a := 1

1

(9)

b := 100

100

(10)

X := RandomVariable(BetaDistribution(a, b))

_R

(11)

PDF(X, x)

piecewise(x < 0, 0, x < 1, (1-x)^99/Beta(1, 100), 0)

(12)

Mean(X)

1/101

(13)

evalf(a/(a+b+n))

0.9082652134423251589464123524069028156222e-3

(14)

 

Now define the 3 factors: 1. the oj/tj=max(oi/ti) 2. tl=min(ti) 3 Andrey's K

 

Factor1 := max(o/t)

2.

(15)

tl := min(t)

.1

(16)

NULL

NULL

K := piecewise(n = 0, 1, n > 0, product('(ni[i]/(t[i]*n))^ni[i]', i = 1 .. ArrayNumElems(t)))

0.5010404556293483040106943769070728625330e73

(17)

 

 

st := time[real]()

Then slove the equition

 

fsolve((int(x*max(0, (1-x/tl)^(n*tl))*PDF(X, x), x = 0 .. z)+int(x*(1-x)^n*K*PDF(X, x), x = z .. 1))/(int(max(0, (1-x/tl)^(n*tl))*PDF(X, x), x = 0 .. z)+int((1-x)^n*K*PDF(X, x), x = z .. 1)) = z, z = 0 .. 1)

0.4029707409116771996036109557668421072220e-1

(18)

%*Factor1

0.8059414818233543992072219115336842144440e-1

(19)

time[real]()-st

11.424

(20)

NULL

NULL

``

``

``

``

``

``

NULL


 

Download XZ_for_MP.mw

Here you are.. Change the Digits at the begining and rerun the whole sheet you will see different results.. Thx

@sand15 

No matter how stupid and simple my question is, I can always find clever tricks/answears in this community!

@vv Thanks it works but why...

@vv Sorry, no actually. 20 minutes passed and it is still evaluating...

@vv thanks, I made a mistake, it should be evalf(Int(z*PDF(0.3*p1+0.7*p2, z, inert), z = 0 .. 1));

@Thomas Richard You see the plot is in the style of @"pointline", but in the legend it is "line"...

@vv 

What if I prefer my paper printed in black-white style...

linestyle is still not pretty in the case of there is horizontal line ( which will overlap with the gridlines... )

@acer Yes, sorry for being misleading.

@Rouben Rostamian  But I got a error:

Error, (in fsolve) yval is in the equation, and is not solved for

 

@Rouben Rostamian  Thanks. But I do not know the colse form of f(x,y), rather there is a fsovle(x,y) in the expression of f(x,y).

@mmcdara 

Hi Thanks for the reply. The p is a function itself caculated by fsolve, i.e. f(x,y)=x-y+p(x,y) where there is a fsolve in p(x,y).

1 2 Page 1 of 2