I just learned about p-value. My understanding of p-value is as follows:
If we take a sample dataset and find out that sample's result, the p-value basically indicates how likely it is to get that (or similar) result for a dataset with similar size and variance, given that the null hypothesis is true.
If it's lower than the significance level, we reject the null hypothesis because there's a very low chance that such a result would come if the null hypothesis were true.
If it's equal to or higher, we accept the null hypothesis because it's likely that such a result would come given that it's true.
Now my question is how exactly is the p-value used in real life? The dataset taken could be an exceptional dataset and could give a completely different result than what is correct. For large datasets, even doing this 5 times could result in incorrect results (by this I mean, datasets with exceptions would hence have p-values that suggest something different than what is actually correct). Basically, how do we ensure that the sample dataset taken is accurate enough for our results and for us to accept/reject the null hypothesis completely?