Objective: Chronic kidney disease patients have a decreased ability to maintain normal electrolyte concentrations in their blood, which increases the risk for ventricular arrhythmias and sudden cardiac death. Non-invasive monitoring of serum potassium and calcium concentration, [K+] and [Ca2+], can help to prevent arrhythmias in these patients. Electrocardiogram (ECG) markers that significantly correlate with [K+] and [Ca2+] have been proposed, but these relations are highly variable between patients. We hypothesized that inter-individual differences in cell type distribution across the ventricular wall can help to explain this variability. Methods: A population of human heart-torso models were built with different proportions of endocardial, midmyocardial and epicardial cells. Propagation of ventricular electrical activity was described by a reaction-diffusion model, with modified Ten Tusscher-Panfilov dynamics. [K+] and [Ca2+] were varied individually and in combination. Twelve-lead ECGs were simulated and the width, amplitude and morphological variability of T waves and QRS complexes were quantified. Results were compared to measurements from 29 end-stage renal disease (ESRD) patients undergoing hemodialysis (HD). Results: Both simulations and patients data showed that most of the analyzed T wave and QRS complex markers correlated strongly with [K+] (absolute median Pearson correlation coefficients, r, ranging from 0.68 to 0.98) and [Ca2+] (ranging from 0.70 to 0.98). The same sign and similar magnitude of median r was observed in the simulations and the patients. Different cell type distributions in the ventricular wall led to variability in ECG markers that was accentuated at high [K+] and low [Ca2+], in agreement with the larger variability between patients measured at the onset of HD. The simulated ECG variability explained part of the measured inter-patient variability. Conclusion: Changes in ECG markers were similarly related to [K+] and [Ca2+] variations in our models and in the ESRD patients. The high inter-patient ECG variability may be explained by variations in cell type distribution across the ventricular wall, with high sensitivity to variations in the proportion of epicardial cells. Significance: Differences in ventricular wall composition help to explain inter-patient variability in ECG response to [K+] and [Ca2+]. This finding can be used to improve serum electrolyte monitoring in ESRD patients.