mmcdara

7891 Reputation

22 Badges

9 years, 55 days

MaplePrimes Activity


These are replies submitted by mmcdara

@Carl Love 

For info.

I discovered another restriction abou this chi square homogeneity test I was absolutly unaware of.
It seems that the class(es) with 5 individuals mut not represent more than 20%...
It is very ambiguous for it's nor clear if it is 20% of the whole size of the sample, or 20% of the number of classes?
In the present case, 5/(8+5+12)=1/5 is not > to 20%
But 1/3 (34cklsees, 1 of size 5) is.

I wasn't capable to find a good text in english that clarifies this point (all the tetxs I found are in french)

I never verified if Maple always returns a warning when a statistical test is used outside its application domain.

@Ramakrishnan @tomleslie

I think there could be some errors in the replies from other contributors.
If I'm not mistaken your last question is "what is the predicted value of the 29th iteration of the map that applies x[n] onto a*x[n+1]+b?"

If this what you want, please look to the attached file

AR1.mw

If I understand correctly your problem, the prediction of x[30] is about 1.567
 

The file is name "AR1" because the iterative map you are interested in is an "Auto Regressive process of order 1" (usually denoted AR(1)) , or an ARIMA(1, 0, 0) process
https://people.duke.edu/~rnau/411arim.htm      (ARIMA(1, 0, 0)

 

@Carl Love 

Good remark, a good statistician should know that.
My apologies

@tomleslie 

For info.

Not unusual.
It's a very classical Auto Regressive process of order 1 (AR(1))
https://en.wikipedia.org/wiki/Autoregressive_model

I correct this:  can't be auroregressive because |a| > 1.
The process is not even stationnary, but can be transform into a stationary one.
The correct framework is not AR bur ARMA (Auto Regressive with Moving Average) 
 

 

@Rouben Rostamian  

Right, I was puzzled, by this "v=p+a at r=1" condition (what is alpha ?, why expressing v as a function of p?)
What disturbs me is that if you write the coordinate system as (r, z), you generally define the velocity vector as (u, v) with u being the radial velocity and v the axial one (same lexical order on the coordinates and the components of v).
Here I'm not even sure that u is the radial velocity (in fact I think it is tha axial (z) one ?)


For NS equations in laminar regime for a newtonian fluid the BCs are always simple:

  • give the (vector of) velocity in a part og the boundary with a non null measure
  • give the stresses (Neuman BC) on the remaining part of the boundary.

The entire boundary has to recievee BC for the velocity which can be

  • D-D  (Dirichlet BC for the radial velocity and Dirichlet  BC for the axial velocity)
    this situation must always exist somewhere on the boundary
  • D-N (N stands for Neuman BCn here on the axial velocity)
  • N-D
  • N-N

The pressure being defined up to an additive constant there is no BC on it.

On a porous wall you may wrute that the velocity depends on the pressure gradient (Darcy's law), 
maybe it is the sense hore of "v=p+a at r=1"

It seems to me that the D-D condition is never impose. As a consequence the problem would be ill-posed

@Rouben Rostamian  

First of all: you probably already know a lot about Navier-Stokes equations, so please avoid thinking I'm giving you a course on the subject and I think you're a newbye :-)


What I understand of the original problem
It looks like solving stationnary Navier-Stokes equation in a cyndrical duct of constant cross section and revolution axis Oz.
This duct extends from z=-1 to z=+1, and has radius r=1.
The problem is written in cylindrical coordinates with symetry around Oz (then the problem is theta-independant).

The unknowns then are: the radial velocity (it seems to be u?) the axial velocity (v?, or maybe I need to exhange the role of u and v) and the pressure which is always defined up to an additive constant.
Generally on set p=0 at one arbitrarypoint on the boundary [r=0, r=1] x [z=-1, z=1]. 

In the problem I describe the radial velocity is always 0 and the pressure must be a function of z alone. At the same time the axial velocity is a function of r and z.

The expected solution is Vradial(r, z) -> 0, Vaxial(r, z) -> Vaxial(r,z), p(r, z) -> p(z).
One can find "by hand" the expressions on these quantities by replacing explicitely the terms left to the arrows by the terms right to the arrows.


A classical problem of this type is: inject a fluid with a given axial velocity at z=-1 and assume that  the outlet axial velocity at z=+1 has reached a steady state regime.  How Vaxial and p do evolve within the duct?
But for this problem we need to introduce these boundary conditions:
Vradial(r, z=-1) = 0
Vaxial(r, z=-1) = f(r)
Vaxial(r=1,  z) = 0                               general case of a no-slip boundary condition
diff(Vaxial(r=1,  z), z) = 0 at z=+1       (outlet steady state regime)
p (z=+1)=0                                        (more natural than p(z=-1)=0 but it's the same thing for the the pressure is only defined
                                                          through its gradient)

All this stuff to say that I have the same doubt you have: I'm not sure that the original problem is well popsed

A good statistician would not use the chi square homogeneity test when the size of the classes are less or equal to 5. Or, if it happens to be the case,, he will use this test after merging these small size classes with other contiguous classes.


see for instance http://www.people.vcu.edu/~wsstreet/courses/314_20033/SPSS.Chi-sqIndepTests.pdf paragraph 5.

 

It' a shame that Maple doesn't warn the user that the test is not applied within its applicability domain...

@vv 
You're probably right, and so was Carl Love

By the way, there is a test case closely related to yours, which is used as a demonstrator for model validation and prediction.
I failed  to find a free version of papers where it is treated.

So I give you the references of the book (a free equation one, written as a "state of the art" on verification and vlidation issues) where this test case is described

Assessing the Reliability of Complex Models: Mathematical and Statistical Foundations of Verification, Validation, and Uncertainty Quantification

april 11, 2013

Validation and Uncertainty Quantification Committee on Mathematical Foundations of Verification


Test case (ball-drop experiment using a variety of balls) is described in chaper 5

I think you will find usefull informations in this book

@erik10 

Here is a more complete approach with a lot of analysis and conclusions.
I had prepared it yesterday but went to sleep before posting it.
Maybe it comes to late for I haven't read your last reply yet.

My_approach_CDF_NoPlots.mw

There is a DoPlot boolean variable set to false on top of the worksheet to avoid plotting the graphs (the size of the file is about 23 Mo with all the plots).

PS: running dsolve on the 105 "candidates" is rather lenghty (the whole worksheet executes in 7 minutes without plots))

Basically I construct here the estimations of the posterior distributions of alpha, v__0 and Drag.
Again;: the strategy I deployed is very naïve (Brute Force) because I prefered presenting the inference in a pedagogical way than giving you a black box code that, miraculously, would return the desired results.

 

You wrote "So my question has now more shifted towards: what is the most proper way to evaluate or decide if model 2 is a good model for the experimental data? ..."
I will give you soon MY detailed opinion on this point.
For the moment: yes I'm convinced that the bayesian approach is the only correct approach to use.
But, in some situations the bayesian approach looks like a drop hammer to kill a fly and using it is akin more to an  intellectual satisfaction than to pragmatism. It's all very case dependent.
Anyhow,  the very problem will be to imagine a seletion criteria that makes sense, not to the statistician but to the physicist.
The mathematical stuff behind should not be the first concern.
 

@erik10 

Hi, 

You will find in the attached file a first treatment of your problem in the following case:

  1. There exist measurement errors on t, x(t) and y(t)
  2. There exist measurement errors on alpha and v__0
  3. We have some prior knowledge (even vague) about the values of the drag coefficient

I put the problem withi a bayesian framework, even if did not explicitely write the probabilistic inference model.

I said it is a first treatment because I'm able to produce the posterior distribution of the drag coefficient, but I need more time to do this.

My_approach.mw

 

You also talked about different models: this can be easily handled by adhoc methods (competiton model , scoring, bayesian point of view).

Let me know if you want to go further on.
 

Sorry for my previous comment.
acer pointed me you mentionned the fact that symbolic parameters were not supported in BV problems.


 

@acer 

I missed the point  (I mainly focused on the worksheet itself).
What a shame Maple handles symbolic input parameters for IVPs but not BVPs!
It's really a very powerful feature (event 'events' can be parameterized this way).

Is this an oversight or a technical impossibility?

Thanks for this old post

Hi, 


Here are a few remarks that could improve your work


I use to solve ODE systems with many (sometimes a large number of) parameters. This may require a large number of calls to dsolve.

To do this I found very useful to use the 'params' option in dsolve.
Doing this, only one call to dsolve(system, ..., params=ListOfSymbolicNames) is necessary.
Denoting sol the result of this operation, it is then very easy to distribute, through the Grid package,  the many evaluations of sol on the nodes of your machine.

From my experience, if T is the CPU time used by the command
sol:=dsolve(system, ..., params=ListOfSymbolicNames) ,
then the time used to "instanciate" the solution sol by setting sol(params=ListOfNumericalValues) is about 0.6*T (it depends probably on the system you solve: I use to use 'events' too, which can significantly increase this T value)

Using Grid on N "true" cores then divides this latter time by N (by about 1.5 N on N hyperthreaded cores on a Windows 7 machine).



Beyond these "advices", your work is far more technical, in terms of Maple usage, than mine. 
It will demand a lot of effort to me to understand all the subtleties you use, but I think I will be able tio benefit from it.

@acer 
Thank you acer.

And, yes, there are many workarounds

First 136 137 138 139 140 141 142 Last Page 138 of 154