Calculation of an equilibrium constant when data for reactants and products is given

Lets say that I want to calculate the equilibrium constant $K$ for a chemical reaction where $\ce{A -> B}$


$$K = [\ce{A}]/[\ce{B}]$$


where $[\ce{A}]$ is the concentration of $\ce{A}$ and $[\ce{B}]$ is the concentration of $\ce{B}$ at equilibrium


I have measured the quantities $[\ce{A}]$ and $[\ce{B}]$ and thus have two sets of data.


To calculate $K$ should I:


* Take the ratio of $[\ce{A}]$ and $[\ce{B}]$ at each data point and then calculate a mean average of all of the $K$ values?
* OR Plot a graph of $[\ce{A}]$ against $[\ce{B}]$ and use the gradient of the best fit line as the value of $K$?


My instinct tells me it is the former as the straight line plot on excel has a non-zero intercept (which is not reasonable). If it is the first option, can you explain to me why it is so? 


