Work with the Normal Distribution
Advanced · Write the code · from SciPy Statistics: Distributions, Hypothesis Tests, and Correlations
From the lesson: SciPy Statistics: Distributions, Hypothesis Tests, and Correlations
A pharmaceutical company develops a new headache medicine. They give it to 100 patients and a placebo to another 100. The treatment group reports slightly fewer headaches. But is that difference real, or just random chance? This is the question statistics answers.
Read the lessonBattery life for a phone model follows a normal distribution with mean 10 hours and standard deviation 1.5 hours. Using scipy.stats.norm, calculate: (1) the probability that a random phone lasts more than 12 hours (print as percentage rounded to 1 decimal), (2) the battery life at the 90th percentile (rounded to 2 decimal places). Print each on a separate line.
More SciPy Statistics exercises
- Compute Descriptive StatisticsAdvanced
- Run an A/B Test with a T-TestAdvanced
- Test Survey Results with Chi-SquareAdvanced
- Calculate and Interpret CorrelationAdvanced
- Compute a Confidence IntervalAdvanced
All Python exercises · 50 practice problems · Data Science & Machine Learning quiz