Symbolic Multivariate DistributionPrevent Part[] from trying to extract parts of symbolic expressionsHow do...

Pre-plastic human skin alternative

Does Gita support doctrine of eternal cycle of birth and death for evil people?

Why must Chinese maps be obfuscated?

How much cash can I safely carry into the USA and avoid civil forfeiture?

Multiple options vs single option UI

How to write a column outside the braces in a matrix?

How to stop co-workers from teasing me because I know Russian?

What does ゆーか mean?

Can we say “you can pay when the order gets ready”?

Was Dennis Ritchie being too modest in this quote about C and Pascal?

"The cow" OR "a cow" OR "cows" in this context

How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?

How do I reattach a shelf to the wall when it ripped out of the wall?

Checks user level and limit the data before saving it to mongoDB

The Defining Moment

Elements other than carbon that can form many different compounds by bonding to themselves?

Get consecutive integer number ranges from list of int

Examples of non trivial equivalence relations , I mean equivalence relations without the expression " same ... as" in their definition?

Extension of 2-adic valuation to the real numbers

What happened to Captain America in Endgame?

A strange hotel

Why does nature favour the Laplacian?

Is it idiomatic to construct against `this`?

Mjolnir's timeline from Thor's perspective



Symbolic Multivariate Distribution


Prevent Part[] from trying to extract parts of symbolic expressionsHow do you pattern match a DataDistributionIs it possible to create a compiled function with some symbolic arguments?Reverse engineer a sample value from a CDFInconsistent DistributionFitTest results?Pattern matching with PDF, Distributed and multivariate distributionsGiven an exact formula, how can Mathematica find a probability distribution whose PDF matches it?TransformedDistribution using integration with parameter doesn't workPDF of sum of squared UniformDistribution (TransformedDistribution)How do I check and justifiy a symbolic result returned by Mathematica?













2












$begingroup$


If I try to input a symbolic multivariate distribution, I do not get a useful result.



PDF[MultinormalDistribution[m, S], x]

(* During evaluation of MultinormalDistribution::vrprm: The value m at position 1 in MultinormalDistribution[m,S] is expected to be a list of real numbers. *)

(* During evaluation of MultinormalDistribution::vrprm: The value m at position 1 in MultinormalDistribution[m,S] is expected to be a list of real numbers.*)
(* PDF[MultinormalDistribution[m, S], x] *)


Clearly, Mathematica could return an appropriate symbolic expression. Is there any way of making it do so?










share|improve this question









$endgroup$

















    2












    $begingroup$


    If I try to input a symbolic multivariate distribution, I do not get a useful result.



    PDF[MultinormalDistribution[m, S], x]

    (* During evaluation of MultinormalDistribution::vrprm: The value m at position 1 in MultinormalDistribution[m,S] is expected to be a list of real numbers. *)

    (* During evaluation of MultinormalDistribution::vrprm: The value m at position 1 in MultinormalDistribution[m,S] is expected to be a list of real numbers.*)
    (* PDF[MultinormalDistribution[m, S], x] *)


    Clearly, Mathematica could return an appropriate symbolic expression. Is there any way of making it do so?










    share|improve this question









    $endgroup$















      2












      2








      2





      $begingroup$


      If I try to input a symbolic multivariate distribution, I do not get a useful result.



      PDF[MultinormalDistribution[m, S], x]

      (* During evaluation of MultinormalDistribution::vrprm: The value m at position 1 in MultinormalDistribution[m,S] is expected to be a list of real numbers. *)

      (* During evaluation of MultinormalDistribution::vrprm: The value m at position 1 in MultinormalDistribution[m,S] is expected to be a list of real numbers.*)
      (* PDF[MultinormalDistribution[m, S], x] *)


      Clearly, Mathematica could return an appropriate symbolic expression. Is there any way of making it do so?










      share|improve this question









      $endgroup$




      If I try to input a symbolic multivariate distribution, I do not get a useful result.



      PDF[MultinormalDistribution[m, S], x]

      (* During evaluation of MultinormalDistribution::vrprm: The value m at position 1 in MultinormalDistribution[m,S] is expected to be a list of real numbers. *)

      (* During evaluation of MultinormalDistribution::vrprm: The value m at position 1 in MultinormalDistribution[m,S] is expected to be a list of real numbers.*)
      (* PDF[MultinormalDistribution[m, S], x] *)


      Clearly, Mathematica could return an appropriate symbolic expression. Is there any way of making it do so?







      probability-or-statistics symbolic






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      mikadomikado

      6,9371929




      6,9371929






















          1 Answer
          1






          active

          oldest

          votes


















          5












          $begingroup$

          You need to supply Mathematica with the structure of your variables:



          (* dimension of distribution *)
          n = 2;

          PDF[
          MultinormalDistribution[
          Array[Subscript[m, ##] &, n],
          Array[Subscript[S, Sequence @@ Sort@{##}] &, {n, n}]
          ],
          Array[Subscript[x, ##] &, n]
          ]


          enter image description here
          We use Array to construct variables of the form Subscript[var,i,j,…] (you can of course use any other form that is more convenient). Note that S is explicitly made symmetric by sorting the indices. The code works without this, but this way there are no "fake" parameters.



          Note: As pointed out by @BobHanlon in the comments, Subscript can often cause issues if used blindly. For actual use, it is much safer to simply use indexed variables such as Array[x, n].






          share|improve this answer











          $endgroup$













          • $begingroup$
            Rather than using subscripted variables, I recommend using indexed variables and then using Format to display the indexed variables as subscripted variables. Subscripted variables tend to cause problems in solvers.
            $endgroup$
            – Bob Hanlon
            28 mins ago










          • $begingroup$
            I am aware of that - I just thought that for a quick demonstration, it would be good enough and it's easy to read. But I will add a comment to the answer to point out potential issues.
            $endgroup$
            – Lukas Lang
            25 mins ago












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "387"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f197180%2fsymbolic-multivariate-distribution%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5












          $begingroup$

          You need to supply Mathematica with the structure of your variables:



          (* dimension of distribution *)
          n = 2;

          PDF[
          MultinormalDistribution[
          Array[Subscript[m, ##] &, n],
          Array[Subscript[S, Sequence @@ Sort@{##}] &, {n, n}]
          ],
          Array[Subscript[x, ##] &, n]
          ]


          enter image description here
          We use Array to construct variables of the form Subscript[var,i,j,…] (you can of course use any other form that is more convenient). Note that S is explicitly made symmetric by sorting the indices. The code works without this, but this way there are no "fake" parameters.



          Note: As pointed out by @BobHanlon in the comments, Subscript can often cause issues if used blindly. For actual use, it is much safer to simply use indexed variables such as Array[x, n].






          share|improve this answer











          $endgroup$













          • $begingroup$
            Rather than using subscripted variables, I recommend using indexed variables and then using Format to display the indexed variables as subscripted variables. Subscripted variables tend to cause problems in solvers.
            $endgroup$
            – Bob Hanlon
            28 mins ago










          • $begingroup$
            I am aware of that - I just thought that for a quick demonstration, it would be good enough and it's easy to read. But I will add a comment to the answer to point out potential issues.
            $endgroup$
            – Lukas Lang
            25 mins ago
















          5












          $begingroup$

          You need to supply Mathematica with the structure of your variables:



          (* dimension of distribution *)
          n = 2;

          PDF[
          MultinormalDistribution[
          Array[Subscript[m, ##] &, n],
          Array[Subscript[S, Sequence @@ Sort@{##}] &, {n, n}]
          ],
          Array[Subscript[x, ##] &, n]
          ]


          enter image description here
          We use Array to construct variables of the form Subscript[var,i,j,…] (you can of course use any other form that is more convenient). Note that S is explicitly made symmetric by sorting the indices. The code works without this, but this way there are no "fake" parameters.



          Note: As pointed out by @BobHanlon in the comments, Subscript can often cause issues if used blindly. For actual use, it is much safer to simply use indexed variables such as Array[x, n].






          share|improve this answer











          $endgroup$













          • $begingroup$
            Rather than using subscripted variables, I recommend using indexed variables and then using Format to display the indexed variables as subscripted variables. Subscripted variables tend to cause problems in solvers.
            $endgroup$
            – Bob Hanlon
            28 mins ago










          • $begingroup$
            I am aware of that - I just thought that for a quick demonstration, it would be good enough and it's easy to read. But I will add a comment to the answer to point out potential issues.
            $endgroup$
            – Lukas Lang
            25 mins ago














          5












          5








          5





          $begingroup$

          You need to supply Mathematica with the structure of your variables:



          (* dimension of distribution *)
          n = 2;

          PDF[
          MultinormalDistribution[
          Array[Subscript[m, ##] &, n],
          Array[Subscript[S, Sequence @@ Sort@{##}] &, {n, n}]
          ],
          Array[Subscript[x, ##] &, n]
          ]


          enter image description here
          We use Array to construct variables of the form Subscript[var,i,j,…] (you can of course use any other form that is more convenient). Note that S is explicitly made symmetric by sorting the indices. The code works without this, but this way there are no "fake" parameters.



          Note: As pointed out by @BobHanlon in the comments, Subscript can often cause issues if used blindly. For actual use, it is much safer to simply use indexed variables such as Array[x, n].






          share|improve this answer











          $endgroup$



          You need to supply Mathematica with the structure of your variables:



          (* dimension of distribution *)
          n = 2;

          PDF[
          MultinormalDistribution[
          Array[Subscript[m, ##] &, n],
          Array[Subscript[S, Sequence @@ Sort@{##}] &, {n, n}]
          ],
          Array[Subscript[x, ##] &, n]
          ]


          enter image description here
          We use Array to construct variables of the form Subscript[var,i,j,…] (you can of course use any other form that is more convenient). Note that S is explicitly made symmetric by sorting the indices. The code works without this, but this way there are no "fake" parameters.



          Note: As pointed out by @BobHanlon in the comments, Subscript can often cause issues if used blindly. For actual use, it is much safer to simply use indexed variables such as Array[x, n].







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 20 mins ago

























          answered 2 hours ago









          Lukas LangLukas Lang

          7,44011032




          7,44011032












          • $begingroup$
            Rather than using subscripted variables, I recommend using indexed variables and then using Format to display the indexed variables as subscripted variables. Subscripted variables tend to cause problems in solvers.
            $endgroup$
            – Bob Hanlon
            28 mins ago










          • $begingroup$
            I am aware of that - I just thought that for a quick demonstration, it would be good enough and it's easy to read. But I will add a comment to the answer to point out potential issues.
            $endgroup$
            – Lukas Lang
            25 mins ago


















          • $begingroup$
            Rather than using subscripted variables, I recommend using indexed variables and then using Format to display the indexed variables as subscripted variables. Subscripted variables tend to cause problems in solvers.
            $endgroup$
            – Bob Hanlon
            28 mins ago










          • $begingroup$
            I am aware of that - I just thought that for a quick demonstration, it would be good enough and it's easy to read. But I will add a comment to the answer to point out potential issues.
            $endgroup$
            – Lukas Lang
            25 mins ago
















          $begingroup$
          Rather than using subscripted variables, I recommend using indexed variables and then using Format to display the indexed variables as subscripted variables. Subscripted variables tend to cause problems in solvers.
          $endgroup$
          – Bob Hanlon
          28 mins ago




          $begingroup$
          Rather than using subscripted variables, I recommend using indexed variables and then using Format to display the indexed variables as subscripted variables. Subscripted variables tend to cause problems in solvers.
          $endgroup$
          – Bob Hanlon
          28 mins ago












          $begingroup$
          I am aware of that - I just thought that for a quick demonstration, it would be good enough and it's easy to read. But I will add a comment to the answer to point out potential issues.
          $endgroup$
          – Lukas Lang
          25 mins ago




          $begingroup$
          I am aware of that - I just thought that for a quick demonstration, it would be good enough and it's easy to read. But I will add a comment to the answer to point out potential issues.
          $endgroup$
          – Lukas Lang
          25 mins ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematica Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f197180%2fsymbolic-multivariate-distribution%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

          Meter-Bus Содержание Параметры шины | Стандартизация |...