Challenge
No
Cthulhu has gathered stickiness and attractiveness ratings for 50 goats. You can download it. Here's some of the data.
- "Goat","Gender","Stinkiness","Attraction"
- "Aisha","F",40,45
- "Andreas","M",48,52
- "August","M",42,43
- "Bertha","F",35,31
- "Bessie","F",19,24
- "Boyd","M","Yuck",38
- "Bridgette","F",31,37
The four fields are:
- Goat name. Cannot be missing.
- Gender: F or M, though there might be extra spaces, and you should allow for upper and lowercase.
- Stinkiness: An integer rating from 0 to 50.
- Attraction: An integer rating from 0 to 50.
Do the analysis for valid records only.
Show the correlations between stinkiness and attraction, but analyze females and males separately. Round to two decimals.
Output:
- Correlations
- ============
- Stinkiness and Attraction
- Females: 0.89
- Males: 0.95
A correlation function is attached to this page if you're using an old Spyder, but it's best to upgrade to at least Spyder 6.
Upload a zip of your project folder. The usual coding standards apply.
If you were logged in as a student, you could submit a solution to this exercise.
Where referenced