Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
What does the line random.sample(students, 4) do in Python?
Statistics & Data Science
Easy
High School (9–10)
High School (11–12)
Undergraduate
General
Statistics Basics › Data and Sampling
AP
A-Level
IGCSE
IB
Created by
StemPy Lab
What does the line
random.sample(students, 4)
do in Python?
It picks every 4th student in the list.
It picks 4 different students, with every group of 4 equally likely.
It picks 4 students, and the same student can be picked twice.
It picks the first 4 students in the list.
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← Which plan gives a simple random sample of 10 from a list of 260 workers?
A hospital has 2100 patient records, and a clerk wants a systematic sample of 70. She chooses a random start of 12. Which record is the third one chosen? →
More on
Statistics Basics › Data and Sampling
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
A fair random poll of 900 voters finds 51% for candidate P and 49% for candidate Q…
Hard
A survey company wants a margin of luck of 2 percentage points…
Medium
A fair random poll of 625 adults finds that 47% plan to buy an electric car in the next five years…
Easy
A made-up district has 8000 households: 5000 in the town and 3000 in the villages…
Hard
All problems on this topic →