[Scilab-users] n dimensional normal distribution

7 messages
Open this post in threaded view
|

[Scilab-users] n dimensional normal distribution

 Let x1, x2, .., xn be an random variable of n dimensional normal distribution. Is there any function that gives the probability of {x1> = k1}&{x2> = k2}&...&{xn> = kn}? -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: {EXT} n dimensional normal distribution

 Hello, > De : fujimoto2005 > Envoyé : dimanche 18 mars 2018 17:32 > > Let x1, x2, .., xn be an random variable of n dimensional normal distribution. > Is there any function that gives the probability of {x1> = k1}&{x2> = k2}&...&{xn> = kn}? I'm not sure I understand well your need. You can have the cumulative distribution function of the normal law with cdfnor() https://help.scilab.org/docs/6.0.1/en_US/cdfnor.htmlIn your case, the syntax is [P,Q]=cdfnor("PQ",X,Mean,Std) So I guess the probability you're looking for would be the product of the Qs for all your single component. Additional functions can be found in the CASCI Atoms module: http://atoms.scilab.org/toolboxes/casciHTH -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: n dimensional normal distribution

 In reply to this post by fujimoto2005 Dear Chan Thank for your reply. " the product of the Qs for all your single component. " is a right answer only when xis are independent. I am looking for the function when they are not independent. Best regards. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: {EXT} Re: n dimensional normal distribution

 Hello, > De : fujimoto2005 > Envoyé : lundi 19 mars 2018 13:15 > > " the product of the Qs for all your single component. " is a right answer only when xis are independent. > I am looking for the function when they are not independent. I'm afraid I can't help further; Maybe if you can share a small example? Otherwise, if you have strong needs I statistics, you may have a look at the R language https://www.r-project.org/although the syntax is a bit weird when you come from Scilab. Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: n dimensional normal distribution

 In reply to this post by fujimoto2005 Le 19/03/2018 à 13:15, fujimoto2005 a écrit : > Dear Chan > Thank for your reply. > > " the product of the Qs for all your single component. " is a right answer > only when xis are independent. > I am looking for the function when they are not independent. > > Best regards. > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html> _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/usersHello, R implements this in  the "TruncatedNormal" package (https://cran.r-project.org/web/packages/TruncatedNormal/) : The routines include (Quasi-) Monte Carlo estimator and a deterministic upper bound of the cumulative distribution function of the multivariate normal. hth S. -- Stéphane Mottelet Ingénieur de recherche EA 4297 Transformations Intégrées de la Matière Renouvelable Département Génie des Procédés Industriels Sorbonne Universités - Université de Technologie de Compiègne CS 60319, 60203 Compiègne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
 In reply to this post by fujimoto2005 Hello Masahiro, Le 18/03/2018 à 17:31, fujimoto2005 a écrit : ```Let x1, x2, .., xn be an random variable of n dimensional normal distribution. Is there any function that gives the probability of {x1> = k1}&{x2> = k2}&...&{xn> = kn}?``` I thougth at the first sight that it would be possible to get this probability with some lexicographic sorting, but it's not the case. I don't thing that we can avoid an explicit loop. Here is a possible direct calculation, from a list of actual samples : ```ns = 20; // number of samples nd = 3; // number of dimensions k = [5 3 7]; m = grand(ns,nd,"nor",8,3) for i = 1:nd [?,r] = gsort(m(:,i)); m = m(r,:); m = m(find(m(:,i)>=k(i)),:) end p = size(m,1)/ns // requested probability``` Example of run :  m  =    12.750144   7.1200267   5.900484    12.575508   5.410083    10.976422    12.399993   3.7475677   10.092495    12.220889   5.4940195   6.1479044    12.158487   5.2062957   11.651957    11.611694   6.6661928   5.9750098    10.718146   2.2454739   11.737011    10.343892   4.2714818   4.7199587    9.9907016   7.7903253   5.9802778    8.3135823   4.8094984   7.1769228    8.0939865   9.2484944   13.215993    8.0098652   3.0198012   7.5767533    7.5354006   10.715856   8.985266    7.4971339   17.821625   5.5456382    6.6502306   8.7791304   8.812858    6.5728805   12.299302   7.9823783    6.2940806   10.376389   7.8221558    5.2862072   6.0566186   11.102784  m  =    7.4971339   17.821625   5.5456382    6.5728805   12.299302   7.9823783    7.5354006   10.715856   8.985266    6.2940806   10.376389   7.8221558    8.0939865   9.2484944   13.215993    6.6502306   8.7791304   8.812858    9.9907016   7.7903253   5.9802778    12.750144   7.1200267   5.900484    11.611694   6.6661928   5.9750098    5.2862072   6.0566186   11.102784    12.220889   5.4940195   6.1479044    12.575508   5.410083    10.976422    12.158487   5.2062957   11.651957    8.3135823   4.8094984   7.1769228    10.343892   4.2714818   4.7199587  m  =    8.0939865   9.2484944   13.215993    12.158487   5.2062957   11.651957    5.2862072   6.0566186   11.102784    12.575508   5.410083    10.976422    7.5354006   10.715856   8.985266    6.6502306   8.7791304   8.812858 --> p = size(m,1)/ns  // requested probability  p  =    0.3 Samuel _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users