product of quadratic forms of random vectors uniform on the sphere












2












$begingroup$


Let $g = (g_1, ..., g_n)$ be a random vector distributed uniformly on the sphere ${ x in mathbb{R}^n : | x |_2 = 1 }$. Let $A, B$ be two symmetric $n times n$ matrices.



I am interested in a simple formula for: $$mathbb{E}[ g^T A g g^T B g ]$$



In particular, I know that if $g$ is a standard normal $N(0, I)$, then
$$
mathbb{E}[ g^T A g g^T B g ] = 2 mathrm{Tr}(AB) + mathrm{Tr}(A)mathrm{Tr}(B) :.
$$



Does something similar hold in the uniform on a sphere case?










share|cite|improve this question









$endgroup$

















    2












    $begingroup$


    Let $g = (g_1, ..., g_n)$ be a random vector distributed uniformly on the sphere ${ x in mathbb{R}^n : | x |_2 = 1 }$. Let $A, B$ be two symmetric $n times n$ matrices.



    I am interested in a simple formula for: $$mathbb{E}[ g^T A g g^T B g ]$$



    In particular, I know that if $g$ is a standard normal $N(0, I)$, then
    $$
    mathbb{E}[ g^T A g g^T B g ] = 2 mathrm{Tr}(AB) + mathrm{Tr}(A)mathrm{Tr}(B) :.
    $$



    Does something similar hold in the uniform on a sphere case?










    share|cite|improve this question









    $endgroup$















      2












      2








      2





      $begingroup$


      Let $g = (g_1, ..., g_n)$ be a random vector distributed uniformly on the sphere ${ x in mathbb{R}^n : | x |_2 = 1 }$. Let $A, B$ be two symmetric $n times n$ matrices.



      I am interested in a simple formula for: $$mathbb{E}[ g^T A g g^T B g ]$$



      In particular, I know that if $g$ is a standard normal $N(0, I)$, then
      $$
      mathbb{E}[ g^T A g g^T B g ] = 2 mathrm{Tr}(AB) + mathrm{Tr}(A)mathrm{Tr}(B) :.
      $$



      Does something similar hold in the uniform on a sphere case?










      share|cite|improve this question









      $endgroup$




      Let $g = (g_1, ..., g_n)$ be a random vector distributed uniformly on the sphere ${ x in mathbb{R}^n : | x |_2 = 1 }$. Let $A, B$ be two symmetric $n times n$ matrices.



      I am interested in a simple formula for: $$mathbb{E}[ g^T A g g^T B g ]$$



      In particular, I know that if $g$ is a standard normal $N(0, I)$, then
      $$
      mathbb{E}[ g^T A g g^T B g ] = 2 mathrm{Tr}(AB) + mathrm{Tr}(A)mathrm{Tr}(B) :.
      $$



      Does something similar hold in the uniform on a sphere case?







      probability-theory probability-distributions uniform-distribution






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Dec 21 '18 at 22:53









      stevesteve

      397110




      397110






















          2 Answers
          2






          active

          oldest

          votes


















          1












          $begingroup$

          Here is another approach to reduce the problem to the Gaussian case. Let $g sim N(0,I)$ and let $theta = g / |g|$ and $r = |g|$ so that $g = rtheta$. It is not hard to verify that $theta$ is uniformly distributed on the sphere and is independent of $r$. Then, we have, by independence,
          begin{align*}
          mathbb E (g^T A g g^T B g) = mathbb E (theta^T A theta theta^T B theta) cdot mathbb E (r^4)
          end{align*}

          and
          begin{align*}
          mathbb E (r^4) &= mathbb E Big(sum_i g_i^2Big)^2 \
          &=sum_i mathbb E g_i^4 + sum_{i neq j} mathbb E g_i^2 mathbb Eg_j^2 \
          &= 3 n + n(n-1) = n(n+2).
          end{align*}






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            Great! This is much simpler-- thanks
            $endgroup$
            – steve
            Dec 22 '18 at 5:40










          • $begingroup$
            @steve, no problem.
            $endgroup$
            – passerby51
            Dec 22 '18 at 5:44



















          0












          $begingroup$

          It turns out the answer is:



          $$
          mathbb{E}[g^T A g g^T B g] = frac{1}{n(n+2)} (2 mathrm{Tr}(AB) + mathrm{Tr}(A) mathrm{Tr}(B)) :.
          $$



          This comes from the Theorem in Section 3 of
          D. P. Wiens, "On Moments of Quadratic Forms in Non-Spherically Distributed Variables" (https://pdfs.semanticscholar.org/f9e3/9424ff32aec189b441dd189b6f819764de6b.pdf). It is straightforward to check that the conditions (1.1) hold for the uniform distribution over the sphere.



          To apply the result, you need to compute $mathbb{E}[g_1^2 g_2^2]$. It turns out this is equal to $frac{1}{n(n+2)}$. Here is a simple way to compute this by symmetry. Observe that:



          $$
          g_1^2 g_2^2 = (1 - g_2^2 - ... - g_n^2) g_2^2 = g_2^2 - g_2^4 - g_3^2 g_2^2 - ... - g_n^2 g_2^2 :.
          $$

          Let $mu = mathbb{E}[g_1^2 g_2^2]$. By symmetry, $mu = mathbb{E}[g_i^2 g_j^2]$ for any $i neq j$. Hence taking expectations,
          $$
          mu = mathbb{E}[g_2^2] - mathbb{E}[g_2^4] - (n-2) mu :.
          $$

          Rearrange to obtain:
          $$
          mu = frac{1}{n-1}left( mathbb{E}[g_2^2] - mathbb{E}[g_2^4] right) :.
          $$

          We can compute $mathbb{E}[g_2^2] = 1/n$ by a similar symmetry argument. Furthermore, since $g_2^2 stackrel{d}{=} mathrm{Beta}(1/2, (n-1)/2)$, we can compute $mathbb{E}[g_2^4]$ by looking up the formula of the second moment of a Beta distribution, which gives us $mathbb{E}[g_2^4] = frac{3}{n(n+2)}$. Hence,
          $$
          mu = frac{1}{n-1}left( frac{1}{n} - frac{3}{n(n+2)} right) = frac{1}{n(n+2)} :.
          $$






          share|cite|improve this answer









          $endgroup$













            Your Answer





            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("mathjaxEditing", function () {
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            });
            });
            }, "mathjax-editing");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "69"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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
            },
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3048974%2fproduct-of-quadratic-forms-of-random-vectors-uniform-on-the-sphere%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1












            $begingroup$

            Here is another approach to reduce the problem to the Gaussian case. Let $g sim N(0,I)$ and let $theta = g / |g|$ and $r = |g|$ so that $g = rtheta$. It is not hard to verify that $theta$ is uniformly distributed on the sphere and is independent of $r$. Then, we have, by independence,
            begin{align*}
            mathbb E (g^T A g g^T B g) = mathbb E (theta^T A theta theta^T B theta) cdot mathbb E (r^4)
            end{align*}

            and
            begin{align*}
            mathbb E (r^4) &= mathbb E Big(sum_i g_i^2Big)^2 \
            &=sum_i mathbb E g_i^4 + sum_{i neq j} mathbb E g_i^2 mathbb Eg_j^2 \
            &= 3 n + n(n-1) = n(n+2).
            end{align*}






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              Great! This is much simpler-- thanks
              $endgroup$
              – steve
              Dec 22 '18 at 5:40










            • $begingroup$
              @steve, no problem.
              $endgroup$
              – passerby51
              Dec 22 '18 at 5:44
















            1












            $begingroup$

            Here is another approach to reduce the problem to the Gaussian case. Let $g sim N(0,I)$ and let $theta = g / |g|$ and $r = |g|$ so that $g = rtheta$. It is not hard to verify that $theta$ is uniformly distributed on the sphere and is independent of $r$. Then, we have, by independence,
            begin{align*}
            mathbb E (g^T A g g^T B g) = mathbb E (theta^T A theta theta^T B theta) cdot mathbb E (r^4)
            end{align*}

            and
            begin{align*}
            mathbb E (r^4) &= mathbb E Big(sum_i g_i^2Big)^2 \
            &=sum_i mathbb E g_i^4 + sum_{i neq j} mathbb E g_i^2 mathbb Eg_j^2 \
            &= 3 n + n(n-1) = n(n+2).
            end{align*}






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              Great! This is much simpler-- thanks
              $endgroup$
              – steve
              Dec 22 '18 at 5:40










            • $begingroup$
              @steve, no problem.
              $endgroup$
              – passerby51
              Dec 22 '18 at 5:44














            1












            1








            1





            $begingroup$

            Here is another approach to reduce the problem to the Gaussian case. Let $g sim N(0,I)$ and let $theta = g / |g|$ and $r = |g|$ so that $g = rtheta$. It is not hard to verify that $theta$ is uniformly distributed on the sphere and is independent of $r$. Then, we have, by independence,
            begin{align*}
            mathbb E (g^T A g g^T B g) = mathbb E (theta^T A theta theta^T B theta) cdot mathbb E (r^4)
            end{align*}

            and
            begin{align*}
            mathbb E (r^4) &= mathbb E Big(sum_i g_i^2Big)^2 \
            &=sum_i mathbb E g_i^4 + sum_{i neq j} mathbb E g_i^2 mathbb Eg_j^2 \
            &= 3 n + n(n-1) = n(n+2).
            end{align*}






            share|cite|improve this answer









            $endgroup$



            Here is another approach to reduce the problem to the Gaussian case. Let $g sim N(0,I)$ and let $theta = g / |g|$ and $r = |g|$ so that $g = rtheta$. It is not hard to verify that $theta$ is uniformly distributed on the sphere and is independent of $r$. Then, we have, by independence,
            begin{align*}
            mathbb E (g^T A g g^T B g) = mathbb E (theta^T A theta theta^T B theta) cdot mathbb E (r^4)
            end{align*}

            and
            begin{align*}
            mathbb E (r^4) &= mathbb E Big(sum_i g_i^2Big)^2 \
            &=sum_i mathbb E g_i^4 + sum_{i neq j} mathbb E g_i^2 mathbb Eg_j^2 \
            &= 3 n + n(n-1) = n(n+2).
            end{align*}







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Dec 22 '18 at 5:09









            passerby51passerby51

            2,1311018




            2,1311018












            • $begingroup$
              Great! This is much simpler-- thanks
              $endgroup$
              – steve
              Dec 22 '18 at 5:40










            • $begingroup$
              @steve, no problem.
              $endgroup$
              – passerby51
              Dec 22 '18 at 5:44


















            • $begingroup$
              Great! This is much simpler-- thanks
              $endgroup$
              – steve
              Dec 22 '18 at 5:40










            • $begingroup$
              @steve, no problem.
              $endgroup$
              – passerby51
              Dec 22 '18 at 5:44
















            $begingroup$
            Great! This is much simpler-- thanks
            $endgroup$
            – steve
            Dec 22 '18 at 5:40




            $begingroup$
            Great! This is much simpler-- thanks
            $endgroup$
            – steve
            Dec 22 '18 at 5:40












            $begingroup$
            @steve, no problem.
            $endgroup$
            – passerby51
            Dec 22 '18 at 5:44




            $begingroup$
            @steve, no problem.
            $endgroup$
            – passerby51
            Dec 22 '18 at 5:44











            0












            $begingroup$

            It turns out the answer is:



            $$
            mathbb{E}[g^T A g g^T B g] = frac{1}{n(n+2)} (2 mathrm{Tr}(AB) + mathrm{Tr}(A) mathrm{Tr}(B)) :.
            $$



            This comes from the Theorem in Section 3 of
            D. P. Wiens, "On Moments of Quadratic Forms in Non-Spherically Distributed Variables" (https://pdfs.semanticscholar.org/f9e3/9424ff32aec189b441dd189b6f819764de6b.pdf). It is straightforward to check that the conditions (1.1) hold for the uniform distribution over the sphere.



            To apply the result, you need to compute $mathbb{E}[g_1^2 g_2^2]$. It turns out this is equal to $frac{1}{n(n+2)}$. Here is a simple way to compute this by symmetry. Observe that:



            $$
            g_1^2 g_2^2 = (1 - g_2^2 - ... - g_n^2) g_2^2 = g_2^2 - g_2^4 - g_3^2 g_2^2 - ... - g_n^2 g_2^2 :.
            $$

            Let $mu = mathbb{E}[g_1^2 g_2^2]$. By symmetry, $mu = mathbb{E}[g_i^2 g_j^2]$ for any $i neq j$. Hence taking expectations,
            $$
            mu = mathbb{E}[g_2^2] - mathbb{E}[g_2^4] - (n-2) mu :.
            $$

            Rearrange to obtain:
            $$
            mu = frac{1}{n-1}left( mathbb{E}[g_2^2] - mathbb{E}[g_2^4] right) :.
            $$

            We can compute $mathbb{E}[g_2^2] = 1/n$ by a similar symmetry argument. Furthermore, since $g_2^2 stackrel{d}{=} mathrm{Beta}(1/2, (n-1)/2)$, we can compute $mathbb{E}[g_2^4]$ by looking up the formula of the second moment of a Beta distribution, which gives us $mathbb{E}[g_2^4] = frac{3}{n(n+2)}$. Hence,
            $$
            mu = frac{1}{n-1}left( frac{1}{n} - frac{3}{n(n+2)} right) = frac{1}{n(n+2)} :.
            $$






            share|cite|improve this answer









            $endgroup$


















              0












              $begingroup$

              It turns out the answer is:



              $$
              mathbb{E}[g^T A g g^T B g] = frac{1}{n(n+2)} (2 mathrm{Tr}(AB) + mathrm{Tr}(A) mathrm{Tr}(B)) :.
              $$



              This comes from the Theorem in Section 3 of
              D. P. Wiens, "On Moments of Quadratic Forms in Non-Spherically Distributed Variables" (https://pdfs.semanticscholar.org/f9e3/9424ff32aec189b441dd189b6f819764de6b.pdf). It is straightforward to check that the conditions (1.1) hold for the uniform distribution over the sphere.



              To apply the result, you need to compute $mathbb{E}[g_1^2 g_2^2]$. It turns out this is equal to $frac{1}{n(n+2)}$. Here is a simple way to compute this by symmetry. Observe that:



              $$
              g_1^2 g_2^2 = (1 - g_2^2 - ... - g_n^2) g_2^2 = g_2^2 - g_2^4 - g_3^2 g_2^2 - ... - g_n^2 g_2^2 :.
              $$

              Let $mu = mathbb{E}[g_1^2 g_2^2]$. By symmetry, $mu = mathbb{E}[g_i^2 g_j^2]$ for any $i neq j$. Hence taking expectations,
              $$
              mu = mathbb{E}[g_2^2] - mathbb{E}[g_2^4] - (n-2) mu :.
              $$

              Rearrange to obtain:
              $$
              mu = frac{1}{n-1}left( mathbb{E}[g_2^2] - mathbb{E}[g_2^4] right) :.
              $$

              We can compute $mathbb{E}[g_2^2] = 1/n$ by a similar symmetry argument. Furthermore, since $g_2^2 stackrel{d}{=} mathrm{Beta}(1/2, (n-1)/2)$, we can compute $mathbb{E}[g_2^4]$ by looking up the formula of the second moment of a Beta distribution, which gives us $mathbb{E}[g_2^4] = frac{3}{n(n+2)}$. Hence,
              $$
              mu = frac{1}{n-1}left( frac{1}{n} - frac{3}{n(n+2)} right) = frac{1}{n(n+2)} :.
              $$






              share|cite|improve this answer









              $endgroup$
















                0












                0








                0





                $begingroup$

                It turns out the answer is:



                $$
                mathbb{E}[g^T A g g^T B g] = frac{1}{n(n+2)} (2 mathrm{Tr}(AB) + mathrm{Tr}(A) mathrm{Tr}(B)) :.
                $$



                This comes from the Theorem in Section 3 of
                D. P. Wiens, "On Moments of Quadratic Forms in Non-Spherically Distributed Variables" (https://pdfs.semanticscholar.org/f9e3/9424ff32aec189b441dd189b6f819764de6b.pdf). It is straightforward to check that the conditions (1.1) hold for the uniform distribution over the sphere.



                To apply the result, you need to compute $mathbb{E}[g_1^2 g_2^2]$. It turns out this is equal to $frac{1}{n(n+2)}$. Here is a simple way to compute this by symmetry. Observe that:



                $$
                g_1^2 g_2^2 = (1 - g_2^2 - ... - g_n^2) g_2^2 = g_2^2 - g_2^4 - g_3^2 g_2^2 - ... - g_n^2 g_2^2 :.
                $$

                Let $mu = mathbb{E}[g_1^2 g_2^2]$. By symmetry, $mu = mathbb{E}[g_i^2 g_j^2]$ for any $i neq j$. Hence taking expectations,
                $$
                mu = mathbb{E}[g_2^2] - mathbb{E}[g_2^4] - (n-2) mu :.
                $$

                Rearrange to obtain:
                $$
                mu = frac{1}{n-1}left( mathbb{E}[g_2^2] - mathbb{E}[g_2^4] right) :.
                $$

                We can compute $mathbb{E}[g_2^2] = 1/n$ by a similar symmetry argument. Furthermore, since $g_2^2 stackrel{d}{=} mathrm{Beta}(1/2, (n-1)/2)$, we can compute $mathbb{E}[g_2^4]$ by looking up the formula of the second moment of a Beta distribution, which gives us $mathbb{E}[g_2^4] = frac{3}{n(n+2)}$. Hence,
                $$
                mu = frac{1}{n-1}left( frac{1}{n} - frac{3}{n(n+2)} right) = frac{1}{n(n+2)} :.
                $$






                share|cite|improve this answer









                $endgroup$



                It turns out the answer is:



                $$
                mathbb{E}[g^T A g g^T B g] = frac{1}{n(n+2)} (2 mathrm{Tr}(AB) + mathrm{Tr}(A) mathrm{Tr}(B)) :.
                $$



                This comes from the Theorem in Section 3 of
                D. P. Wiens, "On Moments of Quadratic Forms in Non-Spherically Distributed Variables" (https://pdfs.semanticscholar.org/f9e3/9424ff32aec189b441dd189b6f819764de6b.pdf). It is straightforward to check that the conditions (1.1) hold for the uniform distribution over the sphere.



                To apply the result, you need to compute $mathbb{E}[g_1^2 g_2^2]$. It turns out this is equal to $frac{1}{n(n+2)}$. Here is a simple way to compute this by symmetry. Observe that:



                $$
                g_1^2 g_2^2 = (1 - g_2^2 - ... - g_n^2) g_2^2 = g_2^2 - g_2^4 - g_3^2 g_2^2 - ... - g_n^2 g_2^2 :.
                $$

                Let $mu = mathbb{E}[g_1^2 g_2^2]$. By symmetry, $mu = mathbb{E}[g_i^2 g_j^2]$ for any $i neq j$. Hence taking expectations,
                $$
                mu = mathbb{E}[g_2^2] - mathbb{E}[g_2^4] - (n-2) mu :.
                $$

                Rearrange to obtain:
                $$
                mu = frac{1}{n-1}left( mathbb{E}[g_2^2] - mathbb{E}[g_2^4] right) :.
                $$

                We can compute $mathbb{E}[g_2^2] = 1/n$ by a similar symmetry argument. Furthermore, since $g_2^2 stackrel{d}{=} mathrm{Beta}(1/2, (n-1)/2)$, we can compute $mathbb{E}[g_2^4]$ by looking up the formula of the second moment of a Beta distribution, which gives us $mathbb{E}[g_2^4] = frac{3}{n(n+2)}$. Hence,
                $$
                mu = frac{1}{n-1}left( frac{1}{n} - frac{3}{n(n+2)} right) = frac{1}{n(n+2)} :.
                $$







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Dec 22 '18 at 3:35









                stevesteve

                397110




                397110






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Mathematics 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%2fmath.stackexchange.com%2fquestions%2f3048974%2fproduct-of-quadratic-forms-of-random-vectors-uniform-on-the-sphere%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

                    Tonle Sap (See)

                    I get strange results when I access the Sqlitedatabase with Unity C# via XAMPP

                    Guatemaltekische Davis-Cup-Mannschaft