So what you're saying is 25/173366316979 *(round time in weighted shares + shelved shares from previous round)= payout for that block. As long as those shares in the entire pool don't out weigh the total amount of shares for the current round.
No, the payout for the block is always 25 BTC. They are paid out to the topmost 173366316979 shares in the stack ("shelf"). If this is an unlucky round (greater than 17.3 Billion shares accepted) then these will all be from the current round, and some shares from the current round will be shelved to hopefully be paid out later. If it is a lucky round, all shares from that round will be paid, and whatever shares are on the top of the stack will be paid out until a total of 17.3 Billions shares are paid out. These shares may be from the last unlucky round, or if there has been a run of good luck, you may have to go back several unlucky blocks.
I guess I should have been more specific to what I was asking here. I'm trying to figure out what a payout would be for an individual miner, not the whole pool. There's no way for the user to see what his shares on the shelf are from unlucky round, but going by what their weighted averages are, you can guess as a payout.
So is that formula how it's figured out correct? What I'm asking is, are the payouts calculated 25/173366316979(100000+50000)=0.0000216305 , where 100,000 is the current round shares and the 50,000 is from a previous unlucky round that made it? So 150,000 is just something for an example.
I'm not sure what you're trying to figure out still. The maximum earnings of a miner are (25/{difficulty} * weighted shares). CPPSRB attempts to pay all of them and never forgets a single share.
In lucky rounds, all shares submitted since the previous block are paid at 100% PPS (the formula above). Older shares in the share log are paid with the remaining funds in latest to oldest order until 25 BTC worth of shares are paid.
In unlucky rounds, the last {difficulty} shares are paid in latest to oldest order. This means that some number of shares are left on the shelf to be paid later. Shares are immediately building on top of these from the new round, however, so the longer the next round the less shelved shares will be paid when a block is found, if any.
Long story short, you can't estimate your earnings with that level of granularity. Your best bet is to use a longer time frame, something like at a minimum, "I should earn about X BTC in 14 days." 30+ days makes more sense. CPPSRB works out so that you get paid as close to 100% PPS as possible.