title: correlation between integers in R
body: <p>I am interested to assess the relationship of the result of entrance exam to the exams results from the first semester - both variables are integers. I have calculated the Pearson correlation for these. </p>
  
  <p>However, since my variables are integers the scatter point are not really scattered. </p>
  
  <p><strong>Is there a better way to calculate and visualize the correlation? Or any other measure of their relationship?</strong> </p>
  
  <p><strong>What if my two integers are not distributed normally?</strong></p>
  
  <p><strong>Is it a problem that they are not on the same scale ?</strong> <code>final</code> is expressed as percentage and <code>entrance_exam</code> is a testscore from 0-15. </p>
  
  <pre><code>test_data &lt;- data.frame("entrance_exam" = sample(0:15,200,replace=T), "final" = sample(0:100,200,replace=T))
  str(test_data)
  cor.test(entrance_exam,percentage)
  
  ggplot(test_data, aes(x=entrance_exam, y=final)) + 
    geom_point()+
    geom_smooth(method=lm, color="black")+
    # labs(title="Correlation between Diagnostic testscore and Percentage",
         # x= "Total testscore", y = "Percentage" )+
    theme(plot.title = element_text(size=15, face="bold", hjust = 0.5))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/kVYTA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kVYTA.png" alt="enter image description here"></a></p>