Probability & Statistics: Data Handling and Random Values

RefreshingOrchid6854 avatar
RefreshingOrchid6854
·
·
Download

Start Quiz

Study Flashcards

12 Questions

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

Gives 3 random integers between 0 and 5

What does np.random.rand(5) produce?

Gives an array with 5 random float values

What is true about a random outcome?

The outcome is not predictable in advance

What must the probabilities of all possible outcomes add up to in a random phenomenon?

Exactly 1

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

One of the values [24,10,12,35,5] at random

What is important for the probability of an outcome to obey?

Probability must be between 0 and 1

What is the purpose of 'data cleaning' in the context of this lecture?

Handling missing values

Which numpy method is used to generate a random float value between 0 and 1?

np.random.rand()

What output value range does np.random.randint(0, 5) produce?

Between 0 and 5

In numpy, what does np.random.randint(0, 5, (2,3)) do?

Generates a 2x3 matrix of random integers between 0 and 5

What is the difference between np.random.randint(0, 5) and np.random.rand()?

Output type (integer vs float)

What does 'Handling missing values' refer to in the context of this lecture?

Dealing with values that are not present in the dataset

This quiz covers topics such as writing and reading data, data cleaning, handling missing values, and generating random numbers using numpy in Python. Explore the differences in outputs between np.random.randint() and np.random.rand().

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser