erated (range 100000 to 200000) Student Name : randomly generated (pick up from common English names : https://www.ssa.gov/oact/babynames/decades/century.html) Student Cumulative GPA : decimal x.xx, randomly gener
Write a Python program that satisfies the following requirements:
Use the following information for both Questions 1 and 2. Let ?n be 500, 1000, 1500 and 2000. There is a size-?n array containing student information including
- Student ID : integer, randomly generated (range 100000 to 200000)
- Student Name : randomly generated (pick up from common English names : https://www.ssa.gov/oact/babynames/decades/century.html)
- Student Cumulative GPA : decimal x.xx, randomly generated with normal distribution (range 1.0 to 4.0)
Search students by student ID using the binary search
1) Normal distribution: symmetrical
2) Normal distribution: positive skew
3) Normal distribution: negative skew
Additional information: Student ID is a discrete random variable. The question said the Student ID should be generated randomly. Even though random variables created by the normal distribution is continuous, you can just round it to integer values and make sure they are distinct. If one of the values happen to be duplicate, you can just regenerate again. You can also use numpy.random.normal to generate normal random variable.
Hypothesis: the distribution of student ID has no effect to the performance (big-?O-notation) of the binary search algorithm.
Determine whether we can reject or fail to reject this hypothesis by showing through running experiments. Try with different levels of skewness.
**Extra credits**: any extra information you can report about the relationship between skewness of normal distribution and search performance.
Step by step
Solved in 3 steps with 1 images