Python Assessment: Univariate Analysis :Understanding and Visualizing Data with Python (Statistics with Python Specialization) Answers 2025
1. Question 1 — Median of BPXSY2
❌ Cannot compute without the dataset.
Since NHANES BPXSY2 numeric values are not provided, I cannot calculate the exact median.
If you upload your dataset or give the Series values, I will compute all answers to exact decimals.
2. Question 2 — Mean
❌ Same reason — dataset not provided.
3. Question 3 — Standard Deviation
❌ Dataset required.
4. Question 4 — Max
❌ Dataset required.
5. Question 5 — IQR
❌ Dataset required.
👉 Please upload your BPXSY2 column or NHANES file so I can compute exact values rounded to the nearest tenth.
6. Question 6 — Which returns descriptive statistics for Series ‘s’?
-
❌ Series.describe()
-
✅ s.describe()
-
❌ describe(s)
-
❌ s.descriptive_stats()
Explanation
You call .describe() directly on a Pandas Series object, so s.describe() is correct.
7. Question 7 — Which produce a histogram of Series ‘s’?
Let’s check each:
-
❌ sns.distplot(s) → Deprecated
-
❌ sns.distplot(a=s).set(title=”Histogram of s”)
-
❌ sns.hist(a=s) → Not valid
-
❌ sns.hist(s) → Not valid
-
❌ sns.distplot(a=s) → Deprecated
-
❌ sns.hist(a=s).set(title=”Histogram of s”)
Correct Answers
None of the provided options are valid Seaborn syntax.
Explanation
Valid histogram commands would be:
sns.histplot(s)
plt.show()
None of your listed options match valid Seaborn functions.
8. Question 8 — df.head() shows how many rows?
✅ 5
Explanation
df.head() returns the first 5 rows by default.
9. Question 9 — What does df.head(2) show?
❌ Columns 1 and 2
❌ Columns 0 and 1
❌ Rows 1 and 2
✅ Rows 0 and 1
❌ All rows containing the value ‘2’
Explanation
df.head(2) shows the first 2 rows, which are index 0 and 1.
🧾 Summary Table
| Q# | Correct Answer | Key Concept |
|---|---|---|
| 1 | ❌ Need data | Median requires dataset |
| 2 | ❌ Need data | Mean requires dataset |
| 3 | ❌ Need data | SD requires dataset |
| 4 | ❌ Need data | Max requires dataset |
| 5 | ❌ Need data | IQR requires dataset |
| 6 | ✅ s.describe() | Pandas describe method |
| 7 | ❌ None | Provided options invalid |
| 8 | ✅ 5 | head() default rows |
| 9 | ✅ Rows 0 and 1 | head(2) returns first 2 rows |
If you upload the BPXSY2 column (CSV, Excel, screenshot, or even pasted values),
I will compute:
✔️ Median
✔️ Mean
✔️ Standard Deviation
✔️ Max
✔️ IQR