examples/AdWords/v201809/Optimization/EstimateKeywordTraffic.php
private static function printMeanEstimate(
        StatsEstimate $minEstimate,
        StatsEstimate $maxEstimate
    ) {
        $meanAverageCpc = self::calculateMeanMicroAmount(
            $minEstimate->getAverageCpc(),
            $maxEstimate->getAverageCpc()
        );

        $meanAveragePosition = self::calculateMean(
            $minEstimate->getAveragePosition(),
            $maxEstimate->getAveragePosition()
        );

        $meanClicks = self::calculateMean(
            $minEstimate->getClicksPerDay(),
            $maxEstimate->getClicksPerDay()
        );

        $meanTotalCost = self::calculateMeanMicroAmount(
            $minEstimate->getTotalCost(),
            $maxEstimate->getTotalCost()
        );

        printf(
            " Estimated average CPC: %s\n",
            self::formatMean($meanAverageCpc)
        );
        printf(
            " Estimated ad position: %s\n",
            self::formatMean($meanAveragePosition)
        );
        printf(" Estimated daily clicks: %s\n", self::formatMean($meanClicks));
        printf(
            " Estimated daily cost: %s\n\n",
            self::formatMean($meanTotalCost)
        );
    }
private static function printMeanEstimate(
        StatsEstimate $minEstimate,
        StatsEstimate $maxEstimate
    ) {
        $meanAverageCpc = self::calculateMeanMicroAmount(
            $minEstimate->getAverageCpc(),
            $maxEstimate->getAverageCpc()
        );

        $meanAveragePosition = self::calculateMean(
            $minEstimate->getAveragePosition(),
            $maxEstimate->getAveragePosition()
        );

        $meanClicks = self::calculateMean(
            $minEstimate->getClicksPerDay(),
            $maxEstimate->getClicksPerDay()
        );

        $meanTotalCost = self::calculateMeanMicroAmount(
            $minEstimate->getTotalCost(),
            $maxEstimate->getTotalCost()
        );

        printf(
            " Estimated average CPC: %s\n",
            self::formatMean($meanAverageCpc)
        );
        printf(
            " Estimated ad position: %s\n",
            self::formatMean($meanAveragePosition)
        );
        printf(" Estimated daily clicks: %s\n", self::formatMean($meanClicks));
        printf(
            " Estimated daily cost: %s\n\n",
            self::formatMean($meanTotalCost)
        );
    }
private static function printMeanEstimate ( StatsEstimate $ minEstimate , StatsEstimate $ maxEstimate ) { $ meanAverageCpc = self :: calculateMeanMicroAmount ( $ minEstimate -> getAverageCpc ( ) , $ maxEstimate -> getAverageCpc ( ) ) ; $ meanAveragePosition = self :: calculateMean ( $ minEstimate -> getAveragePosition ( ) , $ maxEstimate -> getAveragePosition ( ) ) ; $ meanClicks = self :: calculateMean ( $ minEstimate -> getClicksPerDay ( ) , $ maxEstimate -> getClicksPerDay ( ) ) ; $ meanTotalCost = self :: calculateMeanMicroAmount ( $ minEstimate -> getTotalCost ( ) , $ maxEstimate -> getTotalCost ( ) ) ; printf ( " Estimated average CPC: %s\n" , self :: formatMean ( $ meanAverageCpc ) ) ; printf ( " Estimated ad position: %s\n" , self :: formatMean ( $ meanAveragePosition ) ) ; printf ( " Estimated daily clicks: %s\n" , self :: formatMean ( $ meanClicks ) ) ; printf ( " Estimated daily cost: %s\n\n" , self :: formatMean ( $ meanTotalCost ) ) ; }
Prints estimated average CPC, ad position, daily clicks, and daily costs
between the provided lower bound and upper bound of estimated stats.

@param StatsEstimate $minEstimate the lower bound on the estimated stats
@param StatsEstimate $maxEstimate the upper bound on the estimated stats
Prints estimated average CPC ad position daily clicks and daily costs between the provided lower bound and upper bound of estimated stats .