Python Specials #1 - Probability Distribution Function

Publié le: 01 janvier 1970
sur la chaîne: Coder & Maker
103
3

In this code, we first create some sample data from a normal distribution using np.random.normal(). We then plot a histogram of the data using plt.hist() with the density=True argument to display the probability density rather than the raw counts.

Next, we plot the probability density function of the normal distribution using norm.pdf() from the scipy.stats module. We create a range of values for the x-axis using np.linspace() and plot the PDF using plt.plot().

Finally, we set the x-axis label, y-axis label, and title of the plot using plt.xlabel(), plt.ylabel(), and plt.title(), respectively. We then display the plot using plt.show().

Thanks for watching. For more videos and to support us, you can subscribe and follow our channel. Good luck...
All Coder & Maker videos :    • ALL VIDEOS  
More Python Specials videos:    • Python Specials  
More Python Examples videos:    / playlist  
list=PLN6LC3AB64ggeDF1_fR-77gdlNrtz-8VQ
Python Basics Videos :    • Python Basics  
Python Turtle Graphics Module:    • Python Turtle  Graphics  
Python Matplotlib Module Tutorials:    • Python Matplotlib Module  
Python Numpy Module Tutorials:    • Python Numpy Module  
Python Random Module Tutorials:    • Python Random Module  
Python Thonny Graphics Tutorials:    • Python Turtle Tutorials  


Download Thonny Ide: https://thonny.org


Sur cette page du site, vous pouvez voir la vidéo en ligne Python Specials #1 - Probability Distribution Function durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Coder & Maker 01 janvier 1970, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 103 fois et il a aimé 3 téléspectateurs. Bon visionnage!