Finding Percentile (Basic but confusing) 
I have been unusually confused with finding percentile question.


*

*First question is:
So if I want to find the median, for such a case like this, can we use the method of finding median, which is choosing a middle number if there are odd numbers and the mean of the middle two numbers if there are even numbers?

*Then I want to find what is the median GPA. n = 345 and I do 345 * 0.5 = 172.5. Then should I choose the GPA variable 172.5 belongs to?

*How can I find 10% quantile?
 A: As other users have pointed out there is a number of ways to calculate the quantiles of a sample. I believe that E. Langford's article Quartiles in Elementary Statistics published in Journal of Statistics Education gives a nice overview of different methods; it closely follows the findings of Hyndman & Fan's article Sample Quantiles in Statistical Packages published in The American Statistician. The wikipedia article on quantiles is also pretty good. Both journal articles are relatively straight-forward reads even for undergraduates so do not feel intimidated by them.
Going now to your particular questions:


*

*Yes, you can choose the method you describe. As mentioned the median is an order statistic that can be defined as having equal upward rank and downward rank. In your 345-element sample that is clearly the 173rd point of the sorted sample.

*I think you are misinterpreting what the median is and that's why you are asking this. See the definition I gave at point one. In the case of an even-numbered sample the interpolated value between the two mid-points is the natural consequence. 

*This brings us to the point I raised in the beginning of this post. There are different ways that you can define the the $q$-th quantile. I would recommend to find the one used by your software of choice, document this choice within your work and then simply use that. For large samples the difference will be probably negligible; if a third party is concerned about this choice it will be clear where any changes should be made.
I personally do not care about the quantile function I use. I use the default in package I am using at the time and I let it be. If I needed to choose I will probably go with the Def. 5 from the  Hyndman & Fan paper; the one they say it is popular among hydrologists. It appears to have all the (reasonable) properties a quantile estimation should have (as those were picked by H. & F.) and it is easy to compute/visualize: one gets the ECDF, takes the inverse of it (essentially flipping the axial system), and interpolates through the midpoints. Let me stress this is NOT the default in R (it actually the default in MATLAB); it is type=5 in the quantile function, type=7 is R's default. (H. & F. advocate the use of type=8)
And a tiny R-simulation just to showcase the negligible difference in the case of large sample. I will use a bimodal distribution with a sample size almost equal to the one you have:
# Set your seed for reproducibility
set.seed(1234)

# Make 1000 samples of 350 elements each; 
# each sample is a mixture of two Gaussians
X = replicate( c(rnorm(175, mean=-2), rnorm(175, mean=2)), n=1000)

# Get the R default (method=7) quantiles for q=10
q10tp7 =(apply(X, 2, quantile, type=7 , probs= .1)  )
# Get the MATLAB default (method=5)  quantiles for q=10
q10tp5 =(apply(X, 2, quantile, type=5 , probs= .1)  )

# Check their means crudely:
mean(q10tp7) # [1] -2.827594
mean(q10tp5) # [1] -2.835528

# How about a quick Kolmogorov-Smirnov or a Wilcoxon rank sum test?
ks.test(q10tp5, q10tp7)     # p-value =  0.4658
wilcox.test(q10tp5, q10tp7) # p-value =  0.09401

As you see these two methods in the context of a finite and somewhat large sample are not too different. Just document which method you use and move along with your analysis.
A: 1.Calculate the CDF.  (Or in this case CMF since it is discrete.
2.Find the x value corresponding to the desired y value (or quantile)
The CMF is obtained by cumulatively adding the bars, then dividing by n.

A: for Q1&2:- as n=345 median is on (345+1)/2=173-rd place(as data are discrete)..... so you no need to mean the values.
for Q3:- 10% quantile is on (345+1)*0.1=34.6-th place........here you need to apply weighted mean "$(34^{th} GPA) + 0.6*[(35^{th} GPA)-(34^{th} GPA)]$"
PS:- you can get x%-quantile on 346*x%-th place.
Or by any Another methods
