Answer to Question #298289 in Python for gnosh

Question #298289

Write a function that takes as input an array of current values 𝑥 and an array of parameters 𝑝𝑎𝑟𝑎𝑚s params and returns the probability density for each value of 𝑥

x based on a probability distribution that is the weighted sum of as many normal distributions as there are current levels in the data. We were given an array of current values of a single ion channel


1
Expert's answer
2022-02-16T04:45:18-0500
from scipy.stats import beta
import matplotlib.pyplot as plt

a, b = 6, 6

x = beta.rvs(a, b, size=1000)

fig, ax = plt.subplots(1, 1)
ax.hist(x, density=True, histtype='stepfilled', alpha=0.2)
ax.legend(loc='best', frameon=False)
plt.show()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS