Saturday, June 13, 2026
HomeLanguagessympy.stats.Arcsin() in Python

sympy.stats.Arcsin() in Python

With the help of sympy.stats.Arcsin() method, we can get the random variable representing the arcsin distribution.

Syntax : sympy.stats.Arcsin(name, a, b)
where, It must hold the condition -oo < a < b < +oo.
Return : Return the random variable.

Example #1 :
In this example we can see that by using sympy.stats.Arcsin() method, we are able to get the arcsin distribution by using this method.




# Import sympy and Arcsin
from sympy.stats import Arcsin, density
from sympy import Symbol, simplify
  
a = Symbol("a", real = True)
b = Symbol("b", real = True)
z = Symbol("z")
  
# Using sympy.stats.Arcsin() method
X = Arcsin("x", a, b)
gfg = density(X)(z)
  
print(gfg)


Output :

1/(pi*sqrt((-a + z)*(b – z)))

Example #2 :




# Import sympy and Arcsin
from sympy.stats import Arcsin, density
from sympy import Symbol, simplify
  
a = -4
b = 8
z = Symbol("z")
  
# Using sympy.stats.Arcsin() method
X = Arcsin("x", a, b)
gfg = density(X)(z)
  
print(gfg)


Output :

1/(pi*sqrt((8 – z)*(z + 4)))

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

1 COMMENT

Most Popular

Dominic
32515 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6897 POSTS0 COMMENTS
Nicole Veronica
12013 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12109 POSTS0 COMMENTS
Shaida Kate Naidoo
7019 POSTS0 COMMENTS
Ted Musemwa
7262 POSTS0 COMMENTS
Thapelo Manthata
6976 POSTS0 COMMENTS
Umr Jansen
6964 POSTS0 COMMENTS