How to estimate population mean from a single sample Let's say I have an array of values drawn from a normal distribution with mean 50 and standard deviation 10. Using python:
d = np.random.normal(50,10,1000)

I take a single random sample of size n = 10 from this distribution:
s = np.random.choice(d, 10)

What process do I go through to get the best estimate of the population mean from the sample, and an estimation of the margin of error? 
Obviously I know the population mean and standard deviation in this case, but let's pretend I don't. 
I could also take many samples and compute the sampling distribution of the mean, but let's say I can't do that either. 
So I just have this single sample. What process do I go through and can I estimate how often my estimate of the population mean will be wrong? 
 A: I'm assuming infinite population size.
The best estimate of the population mean is the sample mean, $\bar{x}$.
The best estimate of the population standard deviation is the sample standard deviation, $s = \sqrt{\frac{1}{n-1} \sum_{i=1}^n (x_i - \overline{x})^2}$
Since the sample size is less than 30 (10 in this case) and the population standard deviation is unknown, I would prefer to use the T-distribution to develop an interval.
$\bar{x} \pm t(\frac{s}{\sqrt{n}})$
where $t$ is the critical value from the $t_{n-1}$ distribution.  In your case with n=10 and a desired confidence level of 95%, $t_{9}=1.833$. 
More details can be found in this Example.
A: Though Underminer gives a perfectly good answer, I thought I would take the time to provide a Bayesian estimate.
In your problem, you don't explicitly say you have no reason to believe the data are normal, only that the mean and the variance are unknown. The likelihood function is thus
$$ y \sim \mathcal{N}(\mu, \sigma^2)$$
Here, $\mu, \sigma$ must be estimated.  I'll place an uninformative prior on both of these parameters
$$ p(\mu, \sigma^2) \propto (\sigma^2)^{-1} \>.$$
In Bayesian Data Analysis 3 (p.g. 64) Gelman goes through this example and derives an analytic posterior density. The marginal posterior for the variance is 
$$\sigma^{2} | y \sim \operatorname{Inv}-\chi^{2}\left(n-1, s^{2}\right)$$
with 
$$ s^{2}=\frac{1}{n-1} \sum_{i=1}^{n}\left(y_{i}-\overline{y}\right)^{2}$$
while the marginal posterior for the mean conditioned on the variance and the data is
$$\mu | \sigma^{2}, y \sim \mathrm{N}\left(\overline{y}, \sigma^{2} / n\right)$$
We can sample from these densities very easily with python and compute credible intervals.
from scipy.stats import norm, chi2

import numpy as np
import matplotlib.pyplot as plt


population = norm(loc = 50, scale = 10)

n = 10
samp = population.rvs(n)

ybar = samp.mean()
s = samp.var(ddof = 1)

var_posterior = (n-1)*s/chi2(df =n-1).rvs(100_000)
mu_posterior = norm(loc = ybar, scale = np.sqrt(var_postrior/n)).rvs()


#Now for credible intevals
print(np.percentile(mu_posterior, [2.5, 97.5]))
print(np.percentile(np.sqrt(var_posterior), [2.5, 97.5]))

fig, ax = plt.subplots()
ax.hist(mu_posterior, bins = 25)

fig,ax = plt.subplots()
ax.hist(np.sqrt(var_posterior), bins = 25)
plt.show()

The benefit from this method is that you get uncertainty estimates of the variance for cheap, whereas Underminer's method only gives you uncertainty estimates for the mean.
It actually turns out that the posterior is the student-t density (go figure), so all this is more or less equivalent to Underminer's approach.  However, that is only because we assumed we knew nothing about the mean and the variance before hand.  If we knew something about those parameters (for instance, that negative values are impossible, or that they were larger than some number) then we could do much more by means of MCMC.
