Scénario de test & Cas d'usage
Erstellung eines Datensatzes mit Kundennutzungsdaten und Zufriedenheitswerten.
| 1 | DATA casuser.customer_metrics; |
| 2 | INPUT cust_id data_usage_gb call_minutes satisfaction_score; |
| 3 | DATALINES; |
| 4 | 1 15.5 120 8 |
| 5 | 2 2.0 45 4 |
| 6 | 3 50.0 300 9 |
| 7 | 4 0.5 10 3 |
| 8 | 5 25.0 180 7 |
| 9 | 6 10.0 90 6 |
| 10 | 7 5.0 60 5 |
| 11 | 8 100.0 500 10 |
| 12 | ; |
| 13 | RUN; |
| 1 | PROC CAS; |
| 2 | SIMPLE.correlation / |
| 3 | TABLE={name='customer_metrics'} |
| 4 | inputs={{name='data_usage_gb'}, {name='call_minutes'}, {name='satisfaction_score'}} |
| 5 | descriptiveStats=true |
| 6 | covariance=true |
| 7 | pearsonOut={name='corr_output', replace=true}; |
| 8 | RUN; |
| 1 | |
| 2 | PROC CAS; |
| 3 | TABLE.fetch TABLE={name='corr_output'}; |
| 4 | RUN; |
| 5 |
Das System berechnet die Pearson-Korrelationen, zeigt die Kovarianzmatrix an und liefert Mittelwerte/Standardabweichungen für die Nutzungsvariablen. Es wird eine starke positive Korrelation zwischen `data_usage_gb` und `satisfaction_score` erwartet.