# Free DY0-001 practice questions

> 10 free DY0-001 practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/comptia-dy0-001/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/comptia-dy0-001/

### Question 1 of 10

An analyst runs 20 independent hypothesis tests at alpha = 0.05 on a dataset where every null hypothesis is actually true. Which statement BEST describes the risk the analyst faces?

- A. Each test has a 5% chance of a Type II error, so the overall power of the study drops to about 36%
- B. The expected number of false negatives is one, so the sample size should be doubled to compensate
- C. About a 64% chance of at least one false positive, so a multiple-comparison correction is needed
- D. The family-wise error rate stays at 5% because each test is evaluated independently of the others

**Answer:** C

**Explanation:** With 20 independent tests, the family-wise error rate is 1 - 0.95^20, about 0.64, so at least one false positive is likely and a correction such as Bonferroni or Benjamini-Hochberg is warranted. Alpha controls Type I errors, not Type II errors or power. The family-wise rate grows with the number of tests rather than staying at 5%, and false negatives cannot occur when all nulls are true.

### Question 2 of 10 (choose 2)

A data scientist is examining whether daily website sessions and daily revenue move together. The scatter plot shows a monotonic but clearly curved relationship with several extreme values. Which correlation measure is MOST appropriate? (Choose two.)

- A. Pearson's product-moment correlation coefficient
- B. Cramer's V computed from a binned contingency table
- C. Point-biserial correlation with a dichotomized revenue
- D. Spearman's rank correlation coefficient
- E. Kendall's tau rank correlation coefficient

**Answer:** D, E

**Explanation:** Spearman's rho and Kendall's tau are rank-based, so they capture monotonic but nonlinear relationships and are robust to extreme values. Pearson's coefficient measures linear association and is sensitive to outliers. Cramer's V is designed for categorical variables, and point-biserial correlation requires one truly binary variable, so dichotomizing revenue discards information.

### Question 3 of 10

A model predicting customer churn reaches 99% validation accuracy, far above expectations. Investigation shows one feature is the 'account_closed_date' field populated by the billing system. What is the MOST likely problem?

- A. Class imbalance, because churners are a small minority of the validation records
- B. Overfitting caused by too many trees, which memorize noise in the training records
- C. Covariate shift, because the validation period differs from the training period
- D. Target leakage, because the feature is known only after churn occurs

**Answer:** D

**Explanation:** A closure date exists only after a customer churns, so it leaks the target into the features and inflates validation accuracy; it must be removed. Overfitting usually shows a gap between training and validation scores rather than suspiciously high validation scores. Class imbalance can inflate accuracy but not to this level with a clear leaking field, and covariate shift would usually lower validation performance.

### Question 4 of 10

A fraud dataset has 0.5% positive cases. A data scientist applies SMOTE to address the imbalance before splitting the data into training and test sets. What is the PRIMARY problem with this workflow?

- A. Oversampling should always be replaced by undersampling when the positive class is below one percent
- B. SMOTE removes majority-class records, so the model loses most of the legitimate transaction patterns
- C. SMOTE only works with categorical features, so the continuous amounts will be dropped from the data
- D. Synthetic samples built from test-set neighbors leak information and inflate test metrics

**Answer:** D

**Explanation:** Oversampling must be fitted on the training data only; generating synthetic points before the split lets test observations influence training samples and inflates test performance. SMOTE creates synthetic minority samples rather than removing majority records. Standard SMOTE interpolates continuous features, and there is no rule that undersampling must replace oversampling at low prevalence.

### Question 5 of 10

A model was trained to predict the log of claim cost. When predictions are exponentiated back to dollars, total predicted cost is consistently below actual cost. What is the MOST likely reason?

- A. The model must be retrained without any transformation, since logs always bias regressions
- B. The exponent function loses precision for numbers larger than one million in floating point
- C. The log transform made the model overfit, so it underpredicts large claims on unseen data
- D. Back-transforming a mean of logs estimates the median, so a smearing correction is needed

**Answer:** D

**Explanation:** Predicting the mean of log cost and exponentiating yields roughly the conditional median, which is below the mean for right-skewed data; a smearing or variance-based correction restores the mean. Overfitting does not produce systematic underprediction in this way. Floating-point precision is not the issue, and log transforms are useful when corrected properly.

### Question 6 of 10

A deep feedforward network using sigmoid activations in all 20 hidden layers trains extremely slowly, and gradients in the first layers are close to zero. Which change MOST directly addresses the root cause?

- A. Replace the sigmoid activations with ReLU-family activations and use He initialization for the weights
- B. Add dropout with a rate of 0.5 after every hidden layer to reduce co-adaptation between the neurons
- C. Replace the cross-entropy loss with mean squared error so the output gradients become larger near zero
- D. Increase the batch size tenfold so each gradient estimate is computed over many more training examples

**Answer:** A

**Explanation:** Sigmoid derivatives are at most 0.25, so multiplying them through many layers causes vanishing gradients; ReLU-family activations with He initialization keep gradients from shrinking. Switching to MSE with sigmoid outputs actually worsens gradient saturation. Larger batches reduce gradient noise but do not fix the shrinking magnitude, and dropout is a regularizer that does not address vanishing gradients.

### Question 7 of 10

A linear regression model trained on 300 features performs well on training data but poorly on validation data. Many features are believed to be irrelevant. Which technique BEST addresses overfitting while also performing feature selection?

- A. Increasing the learning rate of the solver so the model converges in fewer iterations
- B. Adding interaction terms between the most important features to capture more signal
- C. Ridge (L2) regularization, which shrinks all coefficients toward zero proportionally
- D. Lasso (L1) regularization, which can shrink irrelevant coefficients to exactly zero

**Answer:** D

**Explanation:** L1 regularization penalizes absolute coefficient size and drives some coefficients to exactly zero, which reduces overfitting and selects features. Ridge regression shrinks coefficients but rarely sets them to zero, so it does not perform selection. Interaction terms increase model complexity and worsen overfitting, and the learning rate affects optimization speed rather than generalization.

### Question 8 of 10

Under a privacy regulation, a customer requests deletion of their personal data. Their records were used to train a production model, and copies remain in raw, curated, and feature tables. What is the MOST complete response?

- A. Retrain the model immediately but leave the data in the feature tables, since features are not personal data
- B. Delete the customer's row from the raw table only, since downstream tables will eventually be overwritten anyway
- C. Delete the records from all data stores and backups per policy, and retrain or update affected models on the next cycle
- D. Keep the data but remove the customer's name, since pseudonymized data is outside the regulation's scope

**Answer:** C

**Explanation:** A deletion request applies to every copy of personal data, and models trained on it should be retrained or updated per policy so the data no longer influences them. Deleting only raw data leaves personal data in derived tables. Pseudonymized data is generally still personal data under regulations such as GDPR, and features derived from a person's records can also be personal data.

### Question 9 of 10

A data science team must share a model trained on hospital records with an external research partner. Regulations require that individual patients cannot be re-identified from aggregate statistics the partner queries. Which technique provides a mathematically provable privacy guarantee for those query results?

- A. Pseudonymization, replacing patient names and record numbers with consistent random tokens
- B. Data masking, replacing the middle digits of identifiers with asterisks before each export
- C. Differential privacy, which adds calibrated noise to query results under a privacy budget
- D. Encryption at rest with customer-managed keys stored in a hardware security module

**Answer:** C

**Explanation:** Differential privacy adds noise calibrated to a privacy budget (epsilon), giving a formal bound on how much any individual record can affect query outputs. Pseudonymized and masked data can still be re-identified through linkage of quasi-identifiers. Encryption at rest protects stored data from unauthorized access but offers no protection once authorized queries return results.

### Question 10 of 10

A company wants an internal assistant built on a large language model to answer questions using its policy documents, which change weekly. Answers must cite current sources, and the team wants to avoid frequent retraining. Which approach BEST meets these requirements?

- A. Training a new transformer from scratch on the policy documents so the model has no outside knowledge to confuse it
- B. Prompting the base model with few-shot examples of policy questions and answers written by the compliance team
- C. Full fine-tuning of the language model on the policy corpus every week with the newest document versions included
- D. Retrieval-augmented generation over a vector index of the documents, passing retrieved passages to the model

**Answer:** D

**Explanation:** Retrieval-augmented generation retrieves current passages at query time, so answers reflect weekly updates and can cite sources without retraining. Weekly fine-tuning is costly and still cannot reliably cite passages. Few-shot prompting does not give the model access to the actual documents, and training from scratch on a small corpus would produce a weak model at enormous cost.

Ready for a timed run? Take the free 15-question DY0-001 mini exam: https://devopscodelab.com/app/exams/comptia-dy0-001/mini/

DevOpsCode Lab is not affiliated with CompTIA. DY0-001 and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
