Search Your Question...!

Statistics with Python MCQ's


1.  Which of the following definition is used by default in kurtosis method of scipy.stats module?

   View Answer   

   fisher



2. Which of the following method of scipy.stats module is used to determine inter quartile range a distribution?

   View Answer   

   iqr



3. Which of the following equations represent inter-quartile range (IQR)?

   View Answer   

   Q3 - Q1



4. Which of the following expressions, correctly calculate variance of a sample, x, derived from a population?

   View Answer   

   np.var(x, ddof=1)



5. What is the output of the following expression?

   View Answer   

   from scipy import stats print(stats.mode([8, 9, 8, 7, 9, 6, 7, 6])) ModeResult(mode=array([6]), count=array([2]))



6. Which of the following function in numpy.random module is used to generate uniformly distributed numbers from range [0, 1]?

   View Answer   

   rand



7. Which of the following expression represents a normal distribution with mean 2.0 and variance 4.0?

   View Answer   

   stats is imported from scipy. stats.norm(loc=2.0, scale=2.0)



8. All outcomes of a sample space are mutually exclusive. State if it is true or false?

   View Answer   

   True



9. Which of the following method represent cumulative distribution function of a defined distribution available in scipy.stats module?

   View Answer   

   CDF'



10. Which of the following expressions, set a initial seed to random number generator?

   View Answer   

   np.random.seed(1)



11. All outcomes of a sample space are mutually exclusive. State if it is true or false?

   View Answer   

   True



12. Which of the following function is used to test goodness of fit of a continuous distribution to data?

   View Answer   

   stats.kstest



13. Which of the following function is used to test if categorical data occurs with given frequency?

   View Answer   

   stats.chisquare



14. Which of the following function is used to verify if the mean of population equals a given value?

   View Answer   

   scipy.ttest_1samp



15. An alternative hypothesis states there is no effect. State true or false.

   View Answer   

   False



16. Null hypothesis is accepted if p-value is lower than predetermined significance value. State if it is true or false?

   View Answer   

   False



17. Type I error occurs when _____.

   View Answer   

   a true null hypothesis is rejected.



18. The patsy formula y ~ x1*x2 is equivalent to which of the following expressions?

   View Answer   

   y ~ x1 + x2 + x1*x2



19. Which of the following patsy formula ignores the intercept?

   View Answer   

   y ~ -1 + x1



20. Which sign separates dependent variable from independent variables, in a patsy formula?

   View Answer   

   ~



21. Which of the following function is used to treat a numeric variable as a categorical one?

   View Answer   

   C



22. Which of the following libraries is used for generating design matrices automatically?

   View Answer   

   patsy



23. Which of the following function of patsy module, is used to generate design matrices?

   View Answer   

   dmatrices



24. Which of the following function, available in statsmodels, is used to fit a linear regression model?

   View Answer   

   ols



25. The critical value for a confidence interval for the slope of the least squares regression line for all pairs in the population does not depend on ______.

   View Answer   

   the slope of the least squares regression line for the sample



26. Given the equation of a regression line as y = 1.2x - 3.4. What is residual for point (12, 10)?

   View Answer   

   -1



27. Which of the following attribute can be used on a fitted model summary object to obtain fitted values?

   View Answer   

   fittedvalues



28. R-square value close to zero indicates a good fit. State if it is true or false?

   View Answer   

   False



29. Logistic regression error values are normally distributed. State if it is true or false?

   View Answer   

   False



30. Logistic regression is a classification algorithm. State if it is true or false?

   View Answer   

   True



31. Whether a student will pass or fail in the competitive exam based on hours of study can be solved using .......?

   View Answer   

   logistic regression



32. Which of the following class doesn't suit discrete regression problems?

   View Answer   

   OLS



33. Which of the following function available in statsmodels is used to fit a Poisson regression model?

   View Answer   

   poisson



34. When the observed outcome of dependent variable can have multiple possible types, the logistic regression is ...........?

   View Answer   

   multinomial



35. What is the cumulative probability of finding F-statistic lower than 1, for a F distribution with degrees of freedom 2 and 27?

   View Answer   

   0.619



36. The F ratio is defined as the average within-groups variance divided by the average between-groups variance. State if it is true or false?

   View Answer   

   False



37. While performing anova on a regression model fitted with multiple variables, the alternative hypothesis is framed as: Coefficients of all independent variables not equal to zero. State if it is true or false?

   View Answer   

   False



38. The greater the value of the F ratio, ________________.

   View Answer   

   the less the sample distributions overlap



39. While performing anova on a regression model fitted with a single variable, the null hypothesis is framed as: Coefficient of independent variable is zero. State if it is true or false?

   View Answer   

   True



40. Which of the following options correctly depict the relation between cumulative distribution function (cdf) and survival function (sf)?

   View Answer   

   cdf + sf = 1



41. The F ratio is typically used to test differences between _____?

   View Answer   

   three or more means.



42. Which of the following function is used to test non-correlation between two variables?

   View Answer   

   stats.pearsonr



43. In a linear regression, the coefficients of the model are estimated by minimizing the sum of the squares of ________.

   View Answer   

   residuals



44. Which of the following method from numpy.random module can be used to select few elements randomly from a population?

   View Answer   

   shuffle



45. Which of the following definition is used by default in kurtosis method of scipy.stats module?

   View Answer   

   shuffle



No comments:

Post a Comment