Latih 60 soal wawancara data science asli tentang statistik, probabilitas, Python, pandas, SQL, machine learning, metrik, dan uji A/B.
Tingkat: Data Science InterviewKesulitan: intermediate60 soal60 mnt
Pilih mode latihan, jawab setiap soal, lalu tinjau penjelasannya. Jawaban salah disimpan secara lokal.
Hari beruntun: 0 hariTersimpan hanya di perangkat ini
Kemajuan0 / 60
Waktu tersisa: 00:00
Belum ada jawaban salah tersimpan.
Tidak ada soal yang cocok dengan filter.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 25
Which SQL clause filters rows?
WHERE filters individual rows before grouping. HAVING filters groups, GROUP BY creates groups, and ORDER BY sorts results.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 38
Which task predicts categorical labels?
Classification predicts discrete labels, while regression predicts continuous values. Clustering finds groups and dimensionality reduction compresses features.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 53
What is retention?
Retention measures how many users come back after a defined period. New users, cancellations, and session length are separate metrics.
Soal 54
What is churn?
Churn is the loss of customers or users over time. Referrals, purchases, and email opens are different behaviors.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.