Is numpy.corrcoef() enough to find correlation? I am currently working through Kaggle's titanic competition and I'm trying to figure out the correlation between the Survived column and other columns.  I am using numpy.corrcoef() to matrix the correlation between the columns and here is what I have:

The correlation between pClass &amp; Survived is: [[ 1.         -0.33848104]
 [-0.33848104  1.        ]]

The correlation between Sex &amp; Survived is: [[ 1.         -0.54335138]
 [-0.54335138  1.        ]]

The correlation between Age &amp; Survived is:[[ 1.         -0.07065723]
 [-0.07065723  1.        ]]

The correlation between Fare &amp; Survived is: [[1.         0.25730652]
 [0.25730652 1.        ]]

The correlation between Parent-Children &amp; Survived is: [[1.         0.08162941]
 [0.08162941 1.        ]]

The correlation between Sibling-Spouse &amp; Survived is: [[ 1.        -0.0353225]
 [-0.0353225  1.       ]]

The correlation between Embarked &amp; Survived is: [[ 1.         -0.16767531]
 [-0.16767531  1.        ]]


There should be higher correlation between Survived and [pClass, sex, Sibling-Spouse] and yet the values are really low.  I'm new to this so I understand that a simple method is not the best way to find correlations but at the moment, this doesn't add up.

This is my full code (without the printf() calls):

import pandas as pd
import numpy as np

train = pd.read_csv("https://raw.githubusercontent.com/oo92/Titanic-Kaggle/master/train.csv")
test = pd.read_csv("https://raw.githubusercontent.com/oo92/Titanic-Kaggle/master/test.csv")

survived = train['Survived']
pClass = train['Pclass']
sex = train['Sex'].replace(['female', 'male'], [0, 1])
age = train['Age'].fillna(round(float(np.mean(train['Age'].dropna()))))
fare = train['Fare']
parch = train['Parch']
sibSp = train['SibSp']
embarked = train['Embarked'].replace(['C', 'Q', 'S'], [1, 2, 3])
On a side note, I don't think correlation is the correct measure of relation for you to be using, since Survived is technically a binary categorical variable.

"Correlation" measures used should depend on the type of variables being investigated:


continuous variable v continuous variable: use "traditional" correlation - e.g. Spearman's rank correlation or Pearson's linear correlation.
continuous variable v categorical variable: use an ANOVA F-test / difference of means
categorical variable v categorical variable: use Chi-square / Cramer's V