Question: help me explain things i might've learned from this lab one thing i learned was If we don't specify it before the codes we can

help me explain things i might've learned from this lab one thing i learned was If we don't specify it before the codes we can specify it before the functions like we did st.norm.sf() for the normal distribution lab.

# Load the necessary module from scipy . stats import binom # Get user-defined number of successes k = int(input()) n= 100 p= 0.5 # Set the number of trials and the probability of success in each trial P = binom. pmf(k, n, p) # Calculate the probability of k successes given the defined n and p print (f' {p: . 6E}' ) mean = binom. mean(n, p) # Return the mean of the distribution print(f' {mean: . 2f}' ) var = binom. var(n, p) # Return the variance of the distribution print (f' {var: . 2f}' )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!