Probability & Statistics Part I Lecture 09 Quiz
10 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the purpose of 'data cleaning' in probability and statistics?

  • To handle missing values (correct)
  • To read data
  • To generate random numbers
  • To write data
  • What is the difference between 'np.random.randint(0, 5)' and 'np.random.rand()' in numpy?

  • randint() generates random values in an array, while rand() generates a single random value.
  • There is no difference between them.
  • randint() generates a float value, while rand() generates an integer.
  • randint() generates a random value between 0 and 5, while rand() generates a random float between 0 and 1. (correct)
  • What does 'np.random.randint(0, 5, 3)' do in numpy?

  • Generates a single random integer between 0 and 5
  • Generates an array of size 3 filled with random integers between 0 and 5 (correct)
  • Generates an array of random floats of size 3
  • Generates a random integer between 0 and 5
  • What is the output of 'np.random.rand(5)' in numpy?

    <p>An array of size 5 filled with random floats</p> Signup and view all the answers

    What does np.random.randint(0, 5, 3) output?

    <p>Gives 3 random integers between 0 and 5</p> Signup and view all the answers

    What is the characteristic of a random outcome?

    <p>Not predictable in advance</p> Signup and view all the answers

    In probability, what must the sum of probabilities of all possible outcomes be?

    <p>Equal to 1</p> Signup and view all the answers

    What does np.random.choice([24,10,12,35,5]) output?

    <p>Includes one of the values [24,10,12,35,5]</p> Signup and view all the answers

    What is the main characteristic of probability values?

    <p>They must be between 0 and 1</p> Signup and view all the answers

    What is np.random.rand(5) expected to output?

    <p>Gives an array with 5 random float values</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser