Luyện 60 câu hỏi phỏng vấn khoa học dữ liệu gốc về thống kê, xác suất, Python, pandas, SQL, học máy, chỉ số và kiểm thử A/B.
Cấp độ: Data Science InterviewĐộ khó: intermediate60 câu hỏi60 phút
Chọn chế độ luyện tập, trả lời từng câu rồi xem lời giải. Câu sai được lưu cục bộ.
Chuỗi ngày: 0 ngàyChỉ lưu trên thiết bị này
Tiến độ0 / 60
Thời gian còn lại: 00:00
Chưa có câu sai được lưu.
Không có câu hỏi phù hợp với bộ lọc.
Câu hỏi 1
What is a p-value?
A p-value measures how compatible the observed data are with the null hypothesis. It is not the probability that either hypothesis is true, and it is not an effect size.
Câu hỏi 2
Which distribution is symmetric and bell-shaped?
The normal distribution is symmetric and bell-shaped. Exponential and Poisson distributions are right-skewed, and a uniform distribution is flat.
Câu hỏi 3
What does standard deviation measure?
Standard deviation quantifies how much values vary around the mean. The center is measured by the mean or median, the mode is the most frequent value, and quartiles describe distribution shape.
Câu hỏi 4
Which test compares the means of two independent groups?
A two-sample t-test compares means of two independent groups. A paired t-test compares related measurements, ANOVA compares three or more groups, and chi-square tests categorical associations.
Câu hỏi 5
What does correlation measure?
Correlation quantifies the strength and direction of a linear relationship between two variables. It does not prove causation, measure mean differences, or describe variance alone.
Câu hỏi 6
Which correlation value indicates no linear relationship?
A correlation of 0 means no linear relationship. Values near 1 indicate a strong positive relationship, and values near -1 indicate a strong negative relationship.
Câu hỏi 7
What is a confidence interval?
A confidence interval estimates a range for a population parameter with a confidence level such as 95%. It is not a sample range, effect size, or single prediction.
Câu hỏi 8
Which measure of central tendency is most robust to outliers?
The median is less affected by extreme values than the mean. The mode is the most frequent value, and the range is a spread measure, not central tendency.
Câu hỏi 9
What does P(A|B) represent?
P(A|B) is the conditional probability of A occurring when B is known to have occurred. It is not the joint, union, or reverse conditional probability.
Câu hỏi 10
What is Bayes theorem used for?
Bayes theorem calculates a posterior probability by combining a prior with evidence. It is not for means, correlation, or dimensionality reduction.
Câu hỏi 11
Which distribution models the count of events in a fixed interval?
The Poisson distribution models the number of events in a fixed interval when events occur independently. Binomial models counts of successes in trials, and normal and uniform are continuous.
Câu hỏi 12
What is a type I error?
A type I error is rejecting the null hypothesis when it is actually true, also called a false positive. Failing to reject a false null is a type II error.
Câu hỏi 13
Which pandas function reads a CSV file?
pd.read_csv() reads a CSV file into a DataFrame. The other method names do not exist in pandas.
Câu hỏi 14
Which method returns the first rows of a DataFrame?
.head() returns the first rows, defaulting to five. .tail() returns the last rows; the other names are not pandas methods.
Câu hỏi 15
Which pandas method removes rows with missing values?
.dropna() removes missing values, while .fillna() fills them with a value. .isna() identifies missing values, and .replace() swaps values.
Câu hỏi 16
Which pandas method fills missing values with a chosen value?
.fillna() replaces missing values with a specified value or method. .dropna() removes them, .notna() checks for present values, and .rename() changes labels.
Câu hỏi 17
Which pandas operation groups rows and applies an aggregation?
.groupby() splits data into groups and lets you aggregate with methods such as sum, mean, or count. .merge() combines tables, .pivot() reshapes, and .sort_values() sorts.
Câu hỏi 18
Which method combines two DataFrames by columns?
.merge() joins DataFrames on keys, similar to SQL joins. .concat() stacks them, .append() is deprecated for rows, and .stack() reshapes columns.
Câu hỏi 19
What does .value_counts() do?
.value_counts() returns counts for each unique value in a Series. Sorting, filling missing values, and means are separate operations.
Câu hỏi 20
Which method applies a function to each element in a Series?
.apply() applies a function to each element or row. .sum() aggregates, .describe() gives summary statistics, and .dtypes shows data types.
Câu hỏi 21
What is a pandas DataFrame?
A DataFrame is a two-dimensional labeled data structure with rows and columns. A Series is one-dimensional, and a database or plot is a different concept.
Câu hỏi 22
Which pandas method computes summary statistics?
.describe() computes statistics such as count, mean, standard deviation, min, and quartiles. .head() shows rows, .shape gives dimensions, and .columns lists column labels.
Câu hỏi 23
Which Python library provides multidimensional arrays?
NumPy provides ndarray objects for numerical computation. Requests handles HTTP, Flask builds web apps, and Selenium automates browsers.
Câu hỏi 24
Which Python library is commonly used for plotting?
Matplotlib is a core plotting library, often paired with Seaborn for statistical graphics. Pandas handles data, SciPy provides scientific functions, and scikit-learn provides machine learning models.
Câu hỏi 25
Which SQL clause filters rows?
WHERE filters individual rows before grouping. HAVING filters groups, GROUP BY creates groups, and ORDER BY sorts results.
Câu hỏi 26
Which SQL clause groups rows?
GROUP BY groups rows by one or more columns so aggregates can be computed. WHERE filters rows, HAVING filters groups, and LIMIT restricts rows.
Câu hỏi 27
Which SQL clause filters groups after aggregation?
HAVING filters grouped results after aggregation, while WHERE filters rows before grouping. GROUP BY creates groups, and JOIN combines tables.
Câu hỏi 28
Which join returns all rows from the left table and matching rows from the right?
LEFT JOIN keeps all left rows and fills unmatched right values with null. INNER JOIN keeps only matches, RIGHT JOIN keeps all right rows, and FULL OUTER JOIN keeps all rows from both.
Câu hỏi 29
Which SQL function counts rows?
COUNT() counts rows or non-null values. SUM() adds numeric values, AVG() computes the average, and MAX() returns the largest value.
Câu hỏi 30
Which SQL function computes the average?
AVG() returns the mean of a numeric column. COUNT() counts rows, SUM() totals values, and DISTINCT is a keyword, not an aggregate function.
Câu hỏi 31
Which keyword removes duplicate values from a query result?
SELECT DISTINCT returns unique combinations. UNIQUE is not a standard query keyword in most SQL dialects, and FILTER or ONLY are not used this way.
Câu hỏi 32
Which SQL clause sorts results?
ORDER BY sorts rows by one or more columns in ascending or descending order. GROUP BY groups rows, WHERE filters, and LIMIT restricts the number of rows.
Câu hỏi 33
Which SQL keyword limits the number of returned rows in many dialects?
LIMIT restricts the number of rows in PostgreSQL, MySQL, and SQLite. TOP is used in SQL Server, OFFSET skips rows, and COUNT aggregates.
Câu hỏi 34
Which SQL operator matches string patterns?
LIKE matches patterns with wildcards such as % and _. Equality, IN, and BETWEEN test exact or range values, not patterns.
Câu hỏi 35
What is a primary key?
A primary key uniquely identifies each row and cannot contain null values. A foreign key references another table, and indexes improve performance.
Câu hỏi 36
Which join returns only rows with matches in both tables?
INNER JOIN returns only rows where the join condition matches in both tables. LEFT and RIGHT joins include unmatched rows from one side, and FULL OUTER JOIN includes all rows.
Câu hỏi 37
What is supervised learning?
Supervised learning trains on labeled examples to predict target outcomes. Clustering is unsupervised, dimensionality reduction transforms features, and generation creates new data.
Câu hỏi 38
Which task predicts categorical labels?
Classification predicts discrete labels, while regression predicts continuous values. Clustering finds groups and dimensionality reduction compresses features.
Câu hỏi 39
Which task predicts continuous values?
Regression predicts numeric outcomes such as price or temperature. Classification predicts categories, clustering groups data, and association finds rules.
Câu hỏi 40
Which algorithm is commonly used for binary classification?
Logistic regression models the probability of a binary outcome. K-means clusters, Apriori finds associations, and PCA reduces dimensions.
Câu hỏi 41
What is overfitting?
Overfitting happens when a model captures noise in training data and performs poorly on new data. Underfitting is when a model is too simple.
Câu hỏi 42
Which technique helps reduce overfitting in decision trees?
Limiting depth, pruning, and regularization reduce overfitting. Increasing depth and adding features usually make overfitting worse.
Câu hỏi 43
What is cross-validation?
Cross-validation splits data into folds and evaluates the model across folds for a more stable estimate. Training once on all data leaves no independent evaluation.
Câu hỏi 44
What is precision?
Precision is TP / (TP + FP), the share of positive predictions that are correct. Recall is TP / (TP + FN), the share of actual positives found.
Câu hỏi 45
What is recall?
Recall is TP / (TP + FN), measuring how many actual positives were captured. Precision is TP / (TP + FP), and F1 combines precision and recall.
Câu hỏi 46
What is the F1 score?
F1 is the harmonic mean of precision and recall, balancing both. Accuracy and error are separate measures, and F1 is not a sum or ratio of negatives.
Câu hỏi 47
Which metric is often preferred for imbalanced classification?
F1 is useful for imbalanced data because accuracy can be misleading when one class dominates. MSE and R-squared are for regression.
Câu hỏi 48
What is feature engineering?
Feature engineering creates, transforms, or selects features so models learn better patterns. It is separate from sample size and hyperparameter tuning.
Câu hỏi 49
Which algorithm is commonly used for clustering?
K-means partitions data into clusters based on distance. Linear and logistic regression are supervised, and decision trees can be used for classification or regression.
Câu hỏi 50
What is A/B testing?
A/B testing randomly assigns users to versions and measures the effect of a change. It is not model evaluation, data splitting, or database comparison.
Câu hỏi 51
What is a metric?
A metric is a quantifiable measure such as conversion rate or retention. It is not a column, model, or test, although models are evaluated with metrics.
Câu hỏi 52
What is a conversion rate?
Conversion rate is the share of visitors who complete a desired action, such as purchase or sign-up. The other formulas describe different metrics.
Câu hỏi 53
What is retention?
Retention measures how many users come back after a defined period. New users, cancellations, and session length are separate metrics.
Câu hỏi 54
What is churn?
Churn is the loss of customers or users over time. Referrals, purchases, and email opens are different behaviors.
Câu hỏi 55
What is cohort analysis?
Cohort analysis follows groups, such as users acquired in the same month, to compare behavior over time. It is not A/B testing, algorithm testing, or a simple mean.
Câu hỏi 56
What is a null hypothesis?
The null hypothesis states there is no effect or difference, and experiments test whether evidence supports rejecting it. The alternative hypothesis claims an effect exists.
Câu hỏi 57
Which of the following are Python data analysis libraries? Select all that apply.
NumPy, pandas, and Matplotlib are used for data analysis and visualization. Flask is a web framework, not a data analysis library.
Câu hỏi 58
Which of the following are SQL aggregate functions? Select all that apply.
COUNT, AVG, and SUM are aggregate functions. DISTINCT is a keyword used with SELECT, not an aggregate function.
Câu hỏi 59
A p-value below 0.05 always proves the alternative hypothesis.
A low p-value provides evidence against the null hypothesis, but it does not prove the alternative hypothesis. Results depend on study design, assumptions, and effect size.
Câu hỏi 60
Match each machine learning metric to its definition.
Precision is TP / predicted positives, recall is TP / actual positives, F1 balances precision and recall, and accuracy is correct predictions divided by total predictions.