Skip to content

Commit 3c82d7b

Browse files
Gemini 3.5 Flash Mediumcesine
andcommitted
Fix MANOVA rank deficiency by pruning highly correlated columns and fix dependent variable histograms
Co-authored-by: cesine <cesine@yahoo.com>
1 parent f645347 commit 3c82d7b

13 files changed

Lines changed: 150 additions & 162 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,5 @@ gen/*
9393
!gen/*_validation_plot.png
9494
!gen/*_scatterplots.png
9595
!gen/*_independent_distributions.png
96+
!gen/*_dependent_distributions.png
97+
!gen/*_uninformative_distributions.png

gen/arbres-publics_audit_report.md

Lines changed: 72 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SQL Data Quality and Behavior Analysis Lab Report: arbres-publics
22

3-
**Report Generated on:** 2026-07-23 09:43:28.26632
3+
**Report Generated on:** 2026-07-23 09:52:21.379951
44
**Source Dataset:** `arbres-publics.csv`
55
**Auditor Classification Status:** MINOR ANOMALY DETECTED 🟡
66

@@ -103,7 +103,51 @@ We define a mixed multivariate design incorporating:
103103
#### MANOVA Group Factor Outcomes
104104
We executed [multivariate analysis of variance (MANOVA)](https://en.wikipedia.org/wiki/Multivariate_analysis_of_variance) using [Pillai's trace](https://www.statisticshowto.com/pillais-trace/) to test for overall group differences across continuous variables:
105105

106-
No MANOVA tests could be computed.
106+
- **Group Factor 'INV_TYPE'**:
107+
- Pillai's Trace: `0.1354`
108+
- Approximate F: `156.3662`
109+
- p-value: `< 0.0001` (Statistically Significant)
110+
111+
- **Group Factor 'Rue_cote_LUMPED'**:
112+
- Pillai's Trace: `0.5601`
113+
- Approximate F: `125.9315`
114+
- p-value: `< 0.0001` (Statistically Significant)
115+
116+
- **Group Factor 'Emplacement_LUMPED'**:
117+
- Pillai's Trace: `0.2525`
118+
- Approximate F: `53.0966`
119+
- p-value: `< 0.0001` (Statistically Significant)
120+
121+
- **Group Factor 'Sigle_LUMPED'**:
122+
- Pillai's Trace: `0.4433`
123+
- Approximate F: `32.3058`
124+
- p-value: `< 0.0001` (Statistically Significant)
125+
126+
- **Group Factor 'Essence_latin_LUMPED'**:
127+
- Pillai's Trace: `0.4433`
128+
- Approximate F: `32.3058`
129+
- p-value: `< 0.0001` (Statistically Significant)
130+
131+
- **Group Factor 'Essence_fr_LUMPED'**:
132+
- Pillai's Trace: `0.4433`
133+
- Approximate F: `32.3058`
134+
- p-value: `< 0.0001` (Statistically Significant)
135+
136+
- **Group Factor 'Essence_ang_LUMPED'**:
137+
- Pillai's Trace: `0.4433`
138+
- Approximate F: `32.3058`
139+
- p-value: `< 0.0001` (Statistically Significant)
140+
141+
- **Group Factor 'Stationnement_jour_LUMPED'**:
142+
- Pillai's Trace: `0.1687`
143+
- Approximate F: `34.8504`
144+
- p-value: `< 0.0001` (Statistically Significant)
145+
146+
- **Group Factor 'Stationnement_heure_LUMPED'**:
147+
- Pillai's Trace: `0.2057`
148+
- Approximate F: `16.4451`
149+
- p-value: `< 0.0001` (Statistically Significant)
150+
107151

108152
#### ANOVA Outputs (Significant Univariate Groupings)
109153
We evaluated individual [univariate Analysis of Variance (ANOVA)](https://en.wikipedia.org/wiki/Analysis_of_variance) models for each continuous metric. The following factors show statistically significant differences (p < 0.05) in group means:
@@ -180,24 +224,6 @@ We evaluated individual [univariate Analysis of Variance (ANOVA)](https://en.wik
180224
- **Significant variation in 'Coord_Y' grouped by 'Essence_ang_LUMPED'**: F = `4.5766`, p = `< 0.0001`
181225
- **Significant variation in 'Coord_Y' grouped by 'Stationnement_jour_LUMPED'**: F = `36.2717`, p = `< 0.0001`
182226
- **Significant variation in 'Coord_Y' grouped by 'Stationnement_heure_LUMPED'**: F = `11.6129`, p = `< 0.0001`
183-
- **Significant variation in 'Longitude' grouped by 'ARROND_NOM'**: F = `4179.3510`, p = `< 0.0001`
184-
- **Significant variation in 'Longitude' grouped by 'Rue_cote_LUMPED'**: F = `70.2823`, p = `< 0.0001`
185-
- **Significant variation in 'Longitude' grouped by 'Emplacement_LUMPED'**: F = `42.6297`, p = `< 0.0001`
186-
- **Significant variation in 'Longitude' grouped by 'Sigle_LUMPED'**: F = `6.9019`, p = `< 0.0001`
187-
- **Significant variation in 'Longitude' grouped by 'Essence_latin_LUMPED'**: F = `6.9019`, p = `< 0.0001`
188-
- **Significant variation in 'Longitude' grouped by 'Essence_fr_LUMPED'**: F = `6.9019`, p = `< 0.0001`
189-
- **Significant variation in 'Longitude' grouped by 'Essence_ang_LUMPED'**: F = `6.9019`, p = `< 0.0001`
190-
- **Significant variation in 'Longitude' grouped by 'Stationnement_jour_LUMPED'**: F = `36.1739`, p = `< 0.0001`
191-
- **Significant variation in 'Longitude' grouped by 'Stationnement_heure_LUMPED'**: F = `25.5656`, p = `< 0.0001`
192-
- **Significant variation in 'Latitude' grouped by 'ARROND_NOM'**: F = `5706.9610`, p = `< 0.0001`
193-
- **Significant variation in 'Latitude' grouped by 'Rue_cote_LUMPED'**: F = `32.4302`, p = `< 0.0001`
194-
- **Significant variation in 'Latitude' grouped by 'Emplacement_LUMPED'**: F = `17.5808`, p = `< 0.0001`
195-
- **Significant variation in 'Latitude' grouped by 'Sigle_LUMPED'**: F = `4.5741`, p = `< 0.0001`
196-
- **Significant variation in 'Latitude' grouped by 'Essence_latin_LUMPED'**: F = `4.5741`, p = `< 0.0001`
197-
- **Significant variation in 'Latitude' grouped by 'Essence_fr_LUMPED'**: F = `4.5741`, p = `< 0.0001`
198-
- **Significant variation in 'Latitude' grouped by 'Essence_ang_LUMPED'**: F = `4.5741`, p = `< 0.0001`
199-
- **Significant variation in 'Latitude' grouped by 'Stationnement_jour_LUMPED'**: F = `36.3713`, p = `< 0.0001`
200-
- **Significant variation in 'Latitude' grouped by 'Stationnement_heure_LUMPED'**: F = `11.6520`, p = `< 0.0001`
201227

202228
Figure 2 presents the pairwise scatterplots with a fitted linear regression line of best fit to visualize the correlation and linear relationships between these continuous metrics:
203229

@@ -208,17 +234,17 @@ We standardized the numeric metrics and fitted a [K-Means clustering algorithm](
208234

209235
| Persona Cluster | Order Count | Percentage (%) |
210236
|---|---|---|
211-
| **Cluster 1** | 376 | 7.52% |
212-
| **Cluster 2** | 4624 | 92.48% |
237+
| **Cluster 1** | 4304 | 86.08% |
238+
| **Cluster 2** | 696 | 13.92% |
213239

214240

215241
#### Population Profiles (Cluster Feature Means)
216242
To characterize the discovered tree population profiles in terms of the original variables, the table below presents the mean value of each numeric metric within each cluster:
217243

218-
| Cluster | EMP_NO | ARROND | No_civique | DHP | Distance_pave | District | Code_secteur | Coord_X | Coord_Y | Longitude | Latitude |
219-
|---|---|---|---|---|---|---|---|---|---|---|---|
220-
| **Cluster 1** | 181924.55 | 24.67 | 4992.94 | 23.79 | 3.04 | 196.53 | 1.67 | 281728.15 | 5036944.03 | -73.80 | 45.47 |
221-
| **Cluster 2** | 143259.96 | 6.17 | 5239.44 | 25.40 | 2.53 | 330.70 | 4.01 | 297919.83 | 5045097.88 | -73.59 | 45.55 |
244+
| Cluster | EMP_NO | ARROND | No_civique | DHP | Distance_pave | District | Code_secteur | Coord_X | Coord_Y |
245+
|---|---|---|---|---|---|---|---|---|---|
246+
| **Cluster 1** | 137655.13 | 5.45 | 5487.62 | 25.82 | 2.50 | 328.10 | 4.28 | 297768.84 | 5045826.38 |
247+
| **Cluster 2** | 198807.50 | 20.62 | 3448.55 | 21.93 | 3.27 | 273.62 | 1.35 | 290106.27 | 5036187.96 |
222248

223249

224250
## 4. Exploratory Multivariate Analysis and Cluster Diagnostics
@@ -231,17 +257,15 @@ To reverse-engineer which original variables drive the principal component proje
231257

232258
| Metric | PC1 Loading | PC2 Loading | Influence Strength (PC1 & PC2) |
233259
|---|---|---|---|
234-
| `Coord_Y` | `-0.4401` | `0.4652` | `0.6404` |
235-
| `Latitude` | `-0.4407` | `0.4642` | `0.6401` |
236-
| `Longitude` | `-0.4839` | `-0.3295` | `0.5855` |
237-
| `Coord_X` | `-0.4842` | `-0.3289` | `0.5854` |
238-
| `District` | `-0.1328` | `-0.4090` | `0.4300` |
239-
| `ARROND` | `0.3478` | `0.0666` | `0.3542` |
240-
| `No_civique` | `0.0006` | `0.3275` | `0.3275` |
241-
| `EMP_NO` | `0.0435` | `0.2248` | `0.2290` |
242-
| `Distance_pave` | `0.0287` | `0.1460` | `0.1487` |
243-
| `Code_secteur` | `-0.0412` | `0.0225` | `0.0470` |
244-
| `DHP` | `-0.0187` | `0.0055` | `0.0195` |
260+
| `EMP_NO` | `0.1596` | `0.6995` | `0.7174` |
261+
| `DHP` | `-0.0762` | `-0.6655` | `0.6698` |
262+
| `Coord_X` | `-0.6049` | `0.1298` | `0.6187` |
263+
| `ARROND` | `0.5561` | `0.0075` | `0.5562` |
264+
| `Coord_Y` | `-0.4865` | `0.2090` | `0.5295` |
265+
| `District` | `-0.2238` | `-0.0636` | `0.2327` |
266+
| `Distance_pave` | `0.0674` | `0.0244` | `0.0717` |
267+
| `Code_secteur` | `-0.0461` | `0.0489` | `0.0672` |
268+
| `No_civique` | `0.0093` | `0.0166` | `0.0190` |
245269

246270

247271
### Interpretation of Figure 1:
@@ -314,7 +338,17 @@ document.querySelectorAll('.experiment-button').forEach(button => {
314338
---
315339

316340
## Appendix C: Audited and Uninformative Variables
317-
No variables were identified as uninformative during this audit.
341+
The following table details the variables that were audited and identified as uninformative:
342+
343+
| Variable | Type | Reason for Exclusion |
344+
|---|---|---|
345+
| `Longitude` | collinear | Multicollinearity (high redundancy correlation >= 0.95 with another variable) |
346+
| `Latitude` | collinear | Multicollinearity (high redundancy correlation >= 0.95 with another variable) |
347+
348+
Figure 4 presents the distribution of these uninformative variables, showing why they lack statistical value (e.g. constant values, artificial uniform distributions, or flat statistical groupings):
349+
350+
![Figure 4: Uninformative Variable Distributions](arbres-publics_uninformative_distributions.png)
351+
318352

319353
---
320354

80.3 KB
Loading
-657 KB
Loading
25.8 KB
Loading
8.59 KB
Loading

0 commit comments

Comments
 (0)