# what is the meaning of independent and identically distribution of samples in a dataset for neuralnetworks

random variables like heads or tail that generated by flipping a coin is independent because each time we tossing the result isn't depend on previous toss( in other words the function that generates random variable doesn't have memory). the example also is identically distributed because each toss result follows same distribution (binomial distribution).

but what is the meaning of IID in the case of images classification( like hand written digits dataset). each sample is independent from previous samples but how we ensure they generated with the same probability distribution(or what is the meaning of that in this specific case)?

or in the case of recurrent neural network after that we create over sample (according to the constrains of the problem) from the series. we can do shuffling to ensure the samples in dataset are independent but how about identically distribution of samples?