On Sunday, 8 October 2017 01:10:14 UTC-4, Francesco Bonazzi wrote:
>
> This result is definitely wrong.
>

Sorry, ignore my previous answer, that result is correct. If you sum *n + n*, 
you are summing the same random value. To get the effect of summing two 
uniform distributions, just define a new uniform distribution:

In [8]: m = Uniform('m', 0, 1)

In [9]: density(n+m)
Out[9]: 
      ⎛⎧                                 1     ⎞   ⎛⎧                       
  
      ⎜⎪            0               for ─── < 1⎟   ⎜⎪                       
  
      ⎜⎪                                │z│    ⎟   ⎜⎪                       
  
z ↦ - ⎜⎨                                       ⎟ + ⎜⎨                       
  
      ⎜⎪  ╭─╮0, 2 ⎛2, 1       │ 1⎞             ⎟   ⎜⎪  ╭─╮0, 2 ⎛2, 1       │ 
 
      ⎜⎪z⋅│╶┐     ⎜           │ ─⎟   otherwise ⎟   ⎜⎪z⋅│╶┐     ⎜           │ 
─
      ⎝⎩  ╰─╯2, 2 ⎝      1, 0 │ z⎠             ⎠   ⎝⎩  ╰─╯2, 2 ⎝      1, 0 │ 
p

                                                                     1     
  ⎞
                 0                                            for ─────── < 
1⎟
                                                                  │z - 1│   
 ⎟
                                                                            
 ⎟
       1        ⎞   ╭─╮0, 2 ⎛2, 1       │         1        ⎞               
  ⎟
────────────────⎟ - │╶┐     ⎜           │ ─────────────────⎟     otherwise 
  ⎟
olar_lift(z - 1)⎠   ╰─╯2, 2 ⎝      1, 0 │ polar_lift(z - 1)⎠               
  ⎠


The integral is unable to simplify the expression, but that's another issue.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/001ef5d0-b829-4f2b-ad9a-943e8438717e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to